include/coff/
* xcoff.h (XCOFF_CALLED, XCOFF_IMPORT): Update comments. (XCOFF_WAS_UNDEFINED): New flag. (xcoff_link_hash_table): Add an "rtld" field. bfd/ * coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED flag is set. Assert that all undefined symbols are either imported or defined by a dynamic object. * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise. * xcofflink.c (xcoff_link_add_symbols): Extend function-symbol handling to all relocations. Only set XCOFF_CALLED for function symbols. (xcoff_find_function): New function, split out from... (bfd_xcoff_export_symbol) ...here. (xcoff_set_import_path): New function, split out from... (bfd_xcoff_import_symbol): ...here. Remove assertion for old meaning of XCOFF_CALLED. (xcoff_mark_symbol): If we mark an undefined and unimported symbol, find some way of defining it. If the symbol is a function descriptor, fill in its definition automatically. If the symbol is a function, mark its descriptor and allocate room for global linkage code. Otherwise mark the symbol as implicitly imported. Move the code for creating function descriptors from... (xcoff_build_ldsyms): ...here. Use XCOFF_WAS_UNDEFINED to check for symbols that were implicitly defined. (xcoff_mark): Don't count any dynamic relocations against function symbols. (bfd_xcoff_size_dynamic_sections): Save the rtld parameter in the xcoff link info. (xcoff_link_input_bfd): Remove handling of undefined and unexported symbols. ld/ * emultempl/aix.em (gld${EMULATION_NAME}_handle_option): Make -berok and -bernotok control link_info.unresolved_syms_in_objects and link_info.unresolved_syms_in_shared_libs instead of force_make_executable. ld/testsuite/ * ld-powerpc/aix-glink-1.ex, ld-powerpc/aix-glink-1.s, ld-powerpc/aix-glink-1-32.dd, ld-powerpc/aix-glink-1-64.dd, ld-powerpc/aix-glink-1-32.d, ld-powerpc/aix-glink-1-64.d: New tests. * ld-powerpc/aix52.exp: Run them.
This commit is contained in:
parent
01cdb57d40
commit
8365d22c7b
|
@ -1,3 +1,9 @@
|
||||||
|
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
|
||||||
|
|
||||||
|
* xcoff.h (XCOFF_CALLED, XCOFF_IMPORT): Update comments.
|
||||||
|
(XCOFF_WAS_UNDEFINED): New flag.
|
||||||
|
(xcoff_link_hash_table): Add an "rtld" field.
|
||||||
|
|
||||||
2008-12-23 Johan Olmutz Nielsen <jnielsen@ddci.com>
|
2008-12-23 Johan Olmutz Nielsen <jnielsen@ddci.com>
|
||||||
|
|
||||||
* ti.h (COFF_ADJUST_SCNHDR_OUT_PRE): Define.
|
* ti.h (COFF_ADJUST_SCNHDR_OUT_PRE): Define.
|
||||||
|
|
|
@ -291,11 +291,12 @@ struct xcoff_link_hash_entry
|
||||||
#define XCOFF_LDREL 0x00000008
|
#define XCOFF_LDREL 0x00000008
|
||||||
/* Symbol is the entry point. */
|
/* Symbol is the entry point. */
|
||||||
#define XCOFF_ENTRY 0x00000010
|
#define XCOFF_ENTRY 0x00000010
|
||||||
/* Symbol is called; this is, it appears in a R_BR reloc. */
|
/* Symbol is for a function and is the target of a relocation.
|
||||||
|
The relocation may or may not be a branch-type relocation. */
|
||||||
#define XCOFF_CALLED 0x00000020
|
#define XCOFF_CALLED 0x00000020
|
||||||
/* Symbol needs the TOC entry filled in. */
|
/* Symbol needs the TOC entry filled in. */
|
||||||
#define XCOFF_SET_TOC 0x00000040
|
#define XCOFF_SET_TOC 0x00000040
|
||||||
/* Symbol is explicitly imported. */
|
/* Symbol is implicitly or explicitly imported. */
|
||||||
#define XCOFF_IMPORT 0x00000080
|
#define XCOFF_IMPORT 0x00000080
|
||||||
/* Symbol is explicitly exported. */
|
/* Symbol is explicitly exported. */
|
||||||
#define XCOFF_EXPORT 0x00000100
|
#define XCOFF_EXPORT 0x00000100
|
||||||
|
@ -315,6 +316,8 @@ struct xcoff_link_hash_entry
|
||||||
#define XCOFF_SYSCALL32 0x00008000
|
#define XCOFF_SYSCALL32 0x00008000
|
||||||
/* Symbol is an imported 64 bit syscall. */
|
/* Symbol is an imported 64 bit syscall. */
|
||||||
#define XCOFF_SYSCALL64 0x00010000
|
#define XCOFF_SYSCALL64 0x00010000
|
||||||
|
/* Symbol was not explicitly defined by the time it was marked. */
|
||||||
|
#define XCOFF_WAS_UNDEFINED 0x00020000
|
||||||
|
|
||||||
/* The XCOFF linker hash table. */
|
/* The XCOFF linker hash table. */
|
||||||
|
|
||||||
|
@ -368,6 +371,9 @@ struct xcoff_link_hash_table
|
||||||
/* Whether the .text section must be read-only. */
|
/* Whether the .text section must be read-only. */
|
||||||
bfd_boolean textro;
|
bfd_boolean textro;
|
||||||
|
|
||||||
|
/* Whether -brtl was specified. */
|
||||||
|
bfd_boolean rtld;
|
||||||
|
|
||||||
/* Whether garbage collection was done. */
|
/* Whether garbage collection was done. */
|
||||||
bfd_boolean gc;
|
bfd_boolean gc;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue