summaryrefslogtreecommitdiff
path: root/bfd/elf32-ppc.c
Commit message (Collapse)AuthorAgeFilesLines
* Mon Jun 16 18:56:27 1997 Geoff Keating <geoffk@ozemail.com.au>Ian Lance Taylor1997-06-161-152/+369
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * elf32-ppc.c (ppc_elf_relocate_section): Don't emit R_PPC_REL* relocs in shared libraries which refer to local symbols. Cope with addend when processing a GOT relocation. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Only create symbols for sections that the linker didn't create. (ppc_elf_finish_dynamic_sections): Only try to write out a section symbol if it was created in ppc_elf_size_dynamic_sections. (ppc_elf_relocate_section): Complain if we have to generate a reloc relative to a section for which we didn't output a symbol. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Clean up. PLT relocs are 'rela' relocs, like everything else. .rela.plt is not a read-only section, so we don't have to special-case it. * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Entries in the .rela.bss section are (of course) 'rela' relocs not 'rel' relocs. * elf32-ppc.c (ppc_elf_check_relocs): Initialise srelgot. (ppc_elf_relocate_section): @got offsets are 4 from start of the actual .got section. * elflink.c (_bfd_elf_create_got_section): The three reserved words start from the symbol '_GLOBAL_OFFSET_TABLE_'. * elf32-ppc.c (ppc_elf_size_dynamic_sections): '.rela' is 5 characters, not 4. * elf32-ppc.c (ppc_elf_check_relocs): Use _bfd_elf_create_got_section to create the GOT rather than ppc_elf_create_linker_section. Create the '.rela.got' section ourselves. (ppc_elf_finish_dynamic_symbol): Set up GOT relocations when a symbol has a GOT entry. (ppc_elf_relocate_section): Record when a symbol is used through the GOT, and allocate space in the GOT for each such symbol. (ppc_elf_adjust_dynamic_symbol): Delete unused .got.plt stuff. (ppc_elf_create_linker_section): Delete unused LINKER_SECTION_GOT stuff. * elf32-ppc.c (ppc_elf_howto_raw): GOT16_HA relocs should be treated in a similar way to ADDR16_HA relocs. (ppc_elf_relocate_section): PLTREL24 relocs do not get copied into shared objects; the linker must deal with them. (ppc_elf_create_linker_section): Stop setting _GLOBAL_OFFSET_TABLE_ to the wrong value; delete unused LINKER_SECTION_PLT stuff. (ppc_elf_check_relocs): Delete unused LINKER_SECTION_PLT stuff. (ppc_elf_finish_dynamic_sections): Use BFD calls to get GOT section, not ELF-specific calls. (elf_backend_plt_not_loaded): Set to 1. (elf_backend_got_symbol_offset): Set to 4. * elf-bfd.h (elf_backend_data): Add 'plt_not_loaded' member for when ld.so fills in the PLT; and 'got_symbol_offset' member. * elflink.c (_bfd_elf_create_dynamic_sections): Apply plt_not_loaded member. (_bfd_elf_create_got_section): Apply got_symbol_offset. * elfxx-target.h (elf_backend_plt_not_loaded): Set default to 'loaded'. (elf_backend_G_O_T_offset): Set default to 0. (elfNN_bed): Set added fields. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Was setting DT_RELENT in shared objects; should be DT_RELAENT. * elf32-ppc.c (ppc_elf_relocate_section): Propagate R_PPC_ADDR16_HA relocs to shared objects. Cope with case where such a reloc (in a non-shared object) refers to a symbol that's not defined.
* Undo part of 3/26 change and always create got sectionMichael Meissner1997-04-021-16/+39
|
* * stabs.c (_bfd_stab_section_offset): New function.Ian Lance Taylor1997-03-251-9/+33
| | | | | | | | | | | | * libbfd-in.h (_bfd_stab_section_offset): Declare. * libbfd.h: Rebuild. * elf32-i386.c (elf_i386_relocate_section): Adjust the offset of a stab reloc. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mips.c (mips_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
* * elf32-i386.c (elf_i386_size_dynamic_sections): When checking forIan Lance Taylor1997-01-271-2/+6
| | | | | | | | | | relocations against the text segment, look up the output name of the reloc section. * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise. * elf32-mips.c (mips_elf_size_dynamic_sections): Likewise. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise. * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise. * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
* Fri Jan 3 16:58:31 1997 Richard Henderson <rth@tamu.edu>Ian Lance Taylor1997-01-031-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | elf64-alpha multiple .got rewrite: * elf-bfd.h (struct elf_backend_data): Add always_size_sections entry. (bfd_elf*_mkobject): Don't define here ... * elfxx-target.h: ... but rather here. Default always_size_sections hook to NULL. * elf.c (elf_mkobject): Rename to bfd_elf_mkobject, since that was what the #defines in elf-bfd.h transmuted it to anyway. * section.c: Add SEC_LINKER_CREATED flag. * bfd-in2.h: Rebuild. * elf32-i386.c (elf_i386_check_relocs): Add SEC_LINKER_CREATED to relocation section flags. (elf_i386_size_dynamic_sections): Use SEC_LINKER_CREATED instead of SEC_IN_MEMORY to recognize generated bits. * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_size_dynamic_sections): Likewise. * elf32-mips.c (mips_elf_final_link, mips_elf_create_dynamic_sections, mips_elf_create_compact_rel_section, mips_elf_create_got_section, mips_elf_check_relocs, mips_elf_size_dynamic_sections): Likewise. * elf32-ppc.c (ppc_elf_create_linker_section, ppc_elf_size_dynamic_sections): Likewise. * elf32-sparc.c (elf32_sparc_check_relocs, elf32_sparc_size_dynamic_sections): Likewise. * elflink.c (_bfd_elf_create_got_section): Add SEC_LINKER_CREATED to section flags. (_bfd_elf_create_dynamic_sections): Likewise. (_bfd_elf_make_linker_section_rela): Likewise. * elflink.h (elf_link_create_dynamic_sections): Likewise. (bfd_elf,size_dynamic_sections): Call the always_size_sections hook. (elf_bfd_final_link): Use SEC_LINKER_CREATED instead of SEC_IN_MEMORY to identify generated bits. (elf_link_input_bfd): Likewise. * elf64-alpha.c: Rewrite everything touching relocations.
* Support R_PPC_PLTREL24Michael Meissner1996-12-121-27/+217
|
* * elf32-ppc.c (ppc_elf_howto_raw): For R_PPC_ADDR16_HA, useIan Lance Taylor1996-07-081-2/+42
| | | | | | ppc_elf_addr16_ha_reloc. (ppc_elf_addr16_ha_reloc): New static function. PR 10036.
* Do not put small common symbols into .sbss if ld -rMichael Meissner1996-05-241-1/+3
|
* Forward relocs to output if -BsharedMichael Meissner1996-04-261-38/+78
|
* Add support for linking against shared librariesMichael Meissner1996-04-251-67/+326
|
* * elf32-hppa.c (elf32_hppa_relocate_section): Handle indirect andIan Lance Taylor1996-01-301-10/+13
| | | | | | | | | | warning symbols correctly. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mips.c (mips_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
* Make eabi error messages include symbol name if it is an external symbolMichael Meissner1996-01-251-8/+17
|
* Add more eabi relocationsMichael Meissner1996-01-251-22/+47
|
* Fix typo in eabl relocationsMichael Meissner1996-01-251-8/+48
|
* Implement R_PPC_EMB_{SDA21,RELSDA} relocationsMichael Meissner1996-01-231-2/+11
|
* Do not complain if some objects have the embedded bit set and others do not.Michael Meissner1996-01-231-19/+5
|
* Make 64k .sdata and .sdata2 sections work; fix typosMichael Meissner1996-01-221-58/+20
|
* Fix typo in last changeMichael Meissner1996-01-221-4/+4
|
* snapshot of eabi relocation support.Michael Meissner1996-01-221-368/+318
|
* Add new PPC relocationsMichael Meissner1996-01-151-3/+109
|
* Redo unknown reloc support. Do not allow symbols in .sdata/.sbss to satify ↵Michael Meissner1996-01-151-122/+67
| | | | a TOC16 relocation. Begin support R_PPC_SDA{2,}REL relocation.
* Warn about relocations we do not yet supportMichael Meissner1996-01-131-11/+138
|
* Add PowerPC support for SHF_EXCLUDE, SHT_ORDEREDMichael Meissner1996-01-121-0/+18
|
* update copyrightMichael Meissner1996-01-111-1/+1
|
* Add support for SHT_ORDERED and SHF_EXCLUDEMichael Meissner1996-01-111-0/+33
|
* * elf-bfd.h (struct bfd_elf_section_data): Add tdata field.Ian Lance Taylor1996-01-111-6/+6
| | | | | | | | | (struct elf_obj_tdata): Rename ppc_flags_init field to flags_init. (elf_flags_init): Rename from elf_ppc_flags_init. * elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not elf_ppc_flags_init. (ppc_elf_copy_private_bfd_data): Likewise. (ppc_elf_merge_private_bfd_data): Likewise.
* Make @GOT relocations workMichael Meissner1996-01-041-236/+147
|
* Work in progress to add real GOT supportMichael Meissner1995-12-211-509/+1461
|
* * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handlerIan Lance Taylor1995-09-251-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rather than a direct fprintf. * archive.c (_bfd_write_archive_contents): Likewise. * coffcode.h (coff_slurp_symbol_table): Likewise. * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise. (ppc_elf_unsupported_reloc): Likewise. (ppc_elf_relocate_section): Likewise. * i386linux.c (linux_tally_symbols): Likewise. (linux_finish_dynamic_link): Likewise. * osf-core.c (osf_core_core_file_p): Likewise. * rs6000-core.c (rs6000coff_get_section_contents): Likewise. * som.c (som_sizeof_headers): Likewise. * srec.c (srec_bad_byte): Likewise. * bfd.c (bfd_assert): Likewise. Also change file to be const. * libbfd-in.h (bfd_assert): Declare first parameter const. * libbfd.h: Rebuild. * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning bfd_reloc_overflow is enough. * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort. * coff-h8500.c (rtype2howto): Likewise. * coff-z8k.c (rtype2howto): Likewise. * coffcode.h (dummy_reloc16_extra_cases): Likewise. * elf.c (_bfd_elf_get_lineno): Likewise. (_bfd_elf_no_info_to_howto): Likewise. (_bfd_elf_no_info_to_howto_rel): Likewise. * hp300hpux.c (convert_sym_type): Likewise. (MY(swap_std_reloc_in)): Likewise. * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
* Fix previous changeMichael Meissner1995-09-251-6/+6
|
* Start work to all full PowerPC V.4 reloc support.Michael Meissner1995-09-221-30/+58
|
* minor cleanupMichael Meissner1995-09-221-1/+1
|
* minor cleanupMichael Meissner1995-09-221-2/+0
|
* Add support -mrelocatable-libMichael Meissner1995-09-221-24/+36
|
* Added new files elflink.c, elflink.h, elfcore.h.Ken Raeburn1995-07-061-86/+560
| | | | | | | | | | | | | | | | | | | | | | | Moved some mostly size-independent stuff from elfcode.h to elf.c, adding a data structure to elfcode.h with some misc data and callback functions. Added a pointer to that structure to the target back end data. More work can be done here. Renamed generic elf routines (not cpu-specific stuff) to start with bfd_elf or _bfd_elf. Updated most call sites, sometimes defined some macros. Moved some dynamic linking support code from m68k, sparc, i386 to common files, using target back end flags to control behavior. More work can probably be done here too. Moved core- and linker-support code out of elfcode.h to elf.c, elfcore.h, elflink.h, or elflink.c. Now elfcode.h contains only .o and executable support, plus #includes of elfcore.h and elflink.h. Much of the contents of these other header files can probably still be moved from the .h files to the .c files, to get compiled only once. Cleaned up some "gcc -Wall" warnings regarding unused or uninitialized variables, in generic and cpu-specific code.
* Fix powerpc PC relative reloc & add some 16 bit relocs.Michael Meissner1995-02-151-0/+926