summaryrefslogtreecommitdiff
path: root/bfd
Commit message (Collapse)AuthorAgeFilesLines
* 2001-08-09 H.J. Lu <hjl@gnu.org>H.J. Lu2001-08-094-4/+10
| | | | | | | * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved to ... * elf-bfd.h: Here. * bfd-in2.h: Regenerated.
* 2001-08-09 H.J. Lu <hjl@gnu.org>H.J. Lu2001-08-095-0/+100
| | | | | | | | | | | | | | | * bfd-in.h (bfd_sprintf_vma): New prototype. (bfd_fprintf_vma): Likewise. (bfd_elf_sprintf_vma): Likewise. (bfd_elf_fprintf_vma): Likewise. (bfd_printf_vma): New. Defined with bfd_fprintf_vma. * bfd-in2.h: Regenerated. * bfd.c (bfd_sprintf_vma): New. Defined. (bfd_fprintf_vma): Likewise. * elf.c (bfd_elf_sprintf_vma): New. Defined. (bfd_elf_fprintf_vma): Likewise.
* * coff-rs6000.c: Add missing prototypes.Alan Modra2001-08-0911-100/+268
| | | | | | | | | | | | | | | | | | | | (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow, xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset, xcoff_loader_reloc_offset): Make static. * dwarf1.c: Add missing prototypes. * dwarf2.c: Add missing prototypes. (struct abbrev_info): Move definition. (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise. * elf.c: Add missing prototypes. * elf32-gen.c: Likewise. * elf32-i386.c: Likewise. * elf32-ppc.c: Likewise. (ppc_elf_sort_rela): Use PTR instead of "void *". * elflink.h: Add missing prototypes. Formatting fixes. * merge.c: Add missing prototypes. (last4_eq): Use PTR instead of "void *". (last_eq): Likewise. * syms.c: Add missing prototypes.
* Fix formattingNick Clifton2001-08-093-83/+100
|
* Change 'partial_inplace' to true (this target uses REL relocations) andNick Clifton2001-08-092-2/+8
| | | | 'pcrel_offset' to false (the PC is implied, not stored in the offset).
* * elf-bfd.h (struct elf_backend_data): Add want_got_sym.Alan Modra2001-08-084-17/+34
| | | | | | | * elfxx-target.h (elf_backend_want_got_sym): Define. (elfNN_bed): Add elf_backend_want_got_sym. * elflink.c (_bfd_elf_create_got_section): Define _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
* * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.Alexandre Oliva2001-08-082-2/+90
| | | | | | | (find_rela_addend): New function. (parse_comp_unit): Call it to find the abbrev offset addend. (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new members of dwarf2_debug as debugging information is read.
* Support relocs for sh-coff targets as well as sh-pe.Nick Clifton2001-08-072-6/+11
|
* Include offset of reloc from start of section when computing value forNick Clifton2001-08-032-1/+7
| | | | R_ARM_REL32 reloc.
* * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don'tAlan Modra2001-08-033-5/+15
| | | | | | keep relocs for undefined syms if there are no dynamic sections in executable. * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
* 2001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>Charles Wilson2001-08-023-3/+30
| | | | | | | * cofflink.c (coff_link_check_ar_symbols): also search for __imp__symbol as well as _symbol. * linker.c (_bfd_generic_link_add_archive_symbols): also search for __imp__symbol as well as _symbol.
* Return zero only as the last step of qsort function.Nick Clifton2001-08-012-5/+13
|
* Replace VXWORKS with ARM_COFF_BUGFIX.Nick Clifton2001-08-013-5/+14
|
* Fix prototype of _bfd_ecoff_styp_to_sec_flagsNick Clifton2001-07-302-1/+6
|
* Update dependencies with "make dep-am".Alan Modra2001-07-245-244/+267
|
* 2001-07-15 H.J. Lu <hjl@gnu.org>H.J. Lu2001-07-153-8/+14
| | | | | | * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp. (po/BLD-POTFILES.in): Use tmp.bld instead of tmp. * Makefile.in: Regenerate.
* 2001-07-11 H.J. Lu <hjl@gnu.org>H.J. Lu2001-07-122-6/+9
| | | | | | * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD flags when creating the reloc section if the ALLOC flag in the source section is set.
* sje patch for 32-bit IA-64 ELF relocs for HPUXJim Wilson2001-07-125-0/+31
| | | | | | | | | | | | | * reloc.c (bfd_reloc_code_type): Add IA64 relocs BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elfxx-ia64.c (ia64_howto_table): Define how to handle new relocations. (elfNN_ia64_reloc_type_lookup): Handle new relocations. (elfNN_ia64_check_relocs): Likewise. (elfNN_ia64_install_value): Likewise. (elfNN_ia64_relocate_section): Likewise.
* * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support forJakub Jelinek2001-07-113-19/+42
| | | | | | | | | | | | | | R_SPARC_UA64. (elf32_sparc_check_relocs): Likewise. Only create .rela section for alloced sections in shared libraries. (elf32_sparc_relocate_section): Likewise. Remove redundant check. Optimize unaligned reloc usage. * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant check. * testsuite/gas/sparc/unalign.s: Remove .uaxword test. * testsuite/gas/sparc/unalign.d: Adjust accordingly.
* 2001-07-11 H.J. Lu <hjl@gnu.org>H.J. Lu2001-07-112-2/+13
| | | | | | * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same ALLOC|LOAD flags as the source section for debugging sections when creating the reloc section.
* Fix ia64-linux fortran common linking problem.Jim Wilson2001-07-052-1/+23
| | | | | * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use the section of the bigger symbol.
* Fix ia64-linux binutils readelf -s testsuite failure.Jim Wilson2001-07-052-1/+8
| | | | * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
* For sections containing uninitialised data, only set their size to s_paddrNick Clifton2001-07-052-1/+9
| | | | | if this does not reset their size to zero. MS's latest compilers will set s_paddr to zero.
* 2001-07-04 H.J. Lu <hjl@gnu.org>H.J. Lu2001-07-042-4/+9
| | | | | | * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4400, bfd_mach_mips4600 and bfd_mach_mips5000.
* Support DJGPP COFF targets in bfd_get_sign_extend_vma()Nick Clifton2001-07-032-0/+14
|
* Skip section symbols from sections being discardedNick Clifton2001-07-032-0/+24
|
* * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directlyAlan Modra2001-06-305-49/+38
| | | | | | | | | | | | | | instead of _bfd_elfcore_section_from_phdr. * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove. * elf.c (_bfd_elfcore_section_from_phdr): Remove. (_bfd_elfcore_make_pseudosection): Expedite tail-call. (elfcore_grok_prstatus): Likewise. (elfcore_grok_lwpstatus): Likewise. (bfd_get_elf_phdr_upper_bound): Likewise. (elfcore_make_note_pseudosection): Formatting. (_bfd_elfcore_strndup): Formatting. * elf32-mips.c (mips_elf_sym_is_global): Formatting. (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
* * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosectionAlan Modra2001-06-305-130/+244
| | | | | | | | | | | | | | | | | | | | | | and _bfd_elfcore_strndup. (struct elf_backend_data): Add elf_backend_grok_prstatus and elf_backend_grok_psinfo. * elf.c (_bfd_elfcore_make_pseudosection): New function. (elfcore_grok_prstatus): Use it. (elfcore_make_note_pseudosection): Likewise. (elfcore_strndup): Rename to... (_bfd_elfcore_strndup): Here, and make global. (elfcore_grok_psinfo): Use _bfd_elfcore_strndup. (elfcore_grok_note): Call elf_backend_grok_prstatus and elf_backend_grok_psinfo if available. * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function. (_bfd_elf32_mips_grok_psinfo): New function. (elf_backend_grok_prstatus): Define. (elf_backend_grok_psinfo): Define. * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL. (elf_backend_grok_psinfo): Likewise. (elfNN_bed): Include elf_backend_grok_prstatus and elf_backend_grok_psinfo.
* 2001-06-29 H.J. Lu <hjl@gnu.org>H.J. Lu2001-06-302-2/+8
| | | | | | * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if hplink->sgot is NULL before filling GOT. Checck if hplink->splt is NULL before filling PLT.
* * elflink.h (elf_link_output_extsym): Revert 1999-04-10.Alan Modra2001-06-292-2/+5
|
* Avoid creating COPY relocs.Alan Modra2001-06-272-116/+152
| | | | | | | | | | | | | | | | | | | | | | | | * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic here.. (elf32_hppa_adjust_dynamic_symbol): ..nor here.. (allocate_plt_and_got_and_discard_relocs): .. instead do so here after gc has run. * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete. (IS_ABSOLUTE_RELOC): Define. (elf32_hppa_link_hash_entry): Always include reloc_entries field. (hppa_link_hash_newfunc): Always init it. (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to create COPY relocs only when the reloc is in a read-only section. Instead, allocate space for a dynamic reloc to reference the library symbol directly. Keep track of space we allocate using relocs_entries. (hppa_discard_copies): Delete, and move code to.. (allocate_plt_and_got): ..here. Rename to allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic relocs for non-shared link. (elf32_hppa_size_dynamic_sections): Update calls to above. (elf32_hppa_relocate_section): Write out the dynamic relocs used in lieu of COPY relocs.
* * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamicAlan Modra2001-06-272-60/+75
| | | | | | | | | | here.. (elf_i386_adjust_dynamic_symbol): ..nor here.. (allocate_plt_and_got_and_discard_relocs): .. instead do so here after gc has run. (elf_i386_size_dynamic_sections): Fix a comment. (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code involved in writing reloc out.
* * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):Alan Modra2001-06-252-3/+20
| | | | | | | Ensure syms are dynamic if we might be emitting a reloc. (allocate_plt_and_got_and_discard_relocs): Don't discard relocs for undefweak or undefined syms.. (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
* * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): DiscardAlan Modra2001-06-252-8/+14
| | | | | | relocs without ELF_LINK_HASH_DEF_DYNAMIC set. (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
* 2001-06-24 H.J. Lu <hjl@gnu.org>H.J. Lu2001-06-242-7/+8
| | | | | * cpu-i960.c (scan_960_mach): Don't modify const char *. Use strncasecmp/strcasecmp instead of strncmp/strcmp.
* 2001-06-23 H.J. Lu <hjl@gnu.org>H.J. Lu2001-06-242-3/+11
| | | | | | | * elf32-i386.c (elf_i386_relocate_section): Check the ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the regular object file and treat the weak definition as the normal one.
* * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): TightenAlan Modra2001-06-232-2/+16
| | | | | | unresolved_reloc test to exclude cases where we use "relocation" before setting it to point into the .got. Reinstate fudge for unresolved relocs in debugging sections.
* * elf32-i386.c (elf_i386_relocate_section): Replace uglyAlan Modra2001-06-232-60/+38
| | | | | complicated tests for unresolvable relocs with a simple direct scheme using "unresolved_reloc" var.
* * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename toAlan Modra2001-06-232-95/+108
| | | | | | | | | | | | | | | elf_i386_dyn_relocs. Update comment. (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to dyn_relocs. (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change others to aborts. (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with abort. (elf_i386_size_dynamic_sections): Likewise. (elf_i386_finish_dynamic_symbol): Likewise. (elf_i386_finish_dynamic_sections): Likewise. (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error handling code.
* Avoid creating COPY relocs if possible.Alan Modra2001-06-232-111/+139
| | | | | | | | | | | | | | | | | | | * elf32-i386.c (elf_i386_check_relocs): Tweak condition under which .got created. Mark symbols used by R_386_32 and R_386_PC32 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the reloc is in a read-only section. Instead, allocate space for a dynamic reloc to reference the library symbol directly. Keep track of space we allocate using pcrel_relocs_copied. (discard_copies): Delete, and move code to .. (allocate_plt_and_got): ..here. Rename to allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic relocs for non-shared link. (elf_i386_size_dynamic_sections): Update calls to above functions. (elf_i386_relocate_section): Write out the dynamic relocs. Add more ugly logic to avoid "unresolvable relocation" error. Use htab shortcut in place of elf_hash_table macro. (elf_i386_finish_dynamic_sections): Allow that dynamic .got may not always be created now.
* * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking ofAndreas Jaeger2001-06-212-15/+14
| | | | shared libraries.
* Fix typosNick Clifton2001-06-212-1/+5
|
* * elf32-hppa.c (elf32_hppa_size_dynamic_sections): AlwaysAlan Modra2001-06-212-96/+114
| | | | | | | | | | allocate local .got space. Use shortcuts from hash table for .got and .plt rather than comparing section names. (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than adjusting index into local_got_refcounts to document what we are really doing. (elf32_hppa_relocate_section): Similarly for local_plt_offsets. Tidy .got and .plt error checking.
* * bfdint.texi (BFD relocation functions) <different formats>:Hans-Peter Nilsson2001-06-202-5/+16
| | | | | | | Mention that the GNU linker is aware of input-output format restrictions when generating relocatable output. Make new paragraph for final-link case. (BFD target vector swap): Fix typo.
* * elf-bfd.h (struct elf_backend_data):Catherine Moore2001-06-204-17/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | elf_backend_emit_relocs: New field: Function for emitting relocs. elf_backend_count_relocs: New field: Function for determining the number of relocs to be emitted. * elfxx-target.h: Provide default (NULL) values for elf_backend_emit_relocs and elf_backend_count_relocs. * elflink.h (elf_link_size_reloc_section): Make the hash table big enough to hold the relocs counted by either reloc_count or o->reloc_count. (elf_bfd_final_link) emit_relocs: New boolean, set if relocs should be emitted, either because of a command line option stored in the info structure or because the target provides a special reloc emitting function. If the target provides a reloc counting function use it, unless performing a relocatable link or emitting all relocs. Also set the SEC_RELOC flag on any output section which will contain relocs. (elf_link_input_bfd): emit_relocs: New boolean, set if relocs should be emitted, either because of a command line option stored in the info structure or because the target provides a special reloc emitting function. If the target provides a reloc emitting function, use it, unless performing a relocatable link or emitting all relocs.
* 2001-06-20 H.J. Lu <hjl@gnu.org>H.J. Lu2001-06-202-29/+34
| | | | | * elf32-i386.c (elf_i386_size_dynamic_sections): Always allocate local .got space.
* (elf64_x86_64_relocate_section): Fix creation of dynamic symbols.Andreas Jaeger2001-06-192-23/+55
|
* * elflink.h (struct elf_assign_sym_version_info): Remove memberHans-Peter Nilsson2001-06-184-13/+19
| | | | | | | | | export_dynamic. All users changed to use info member. NAME(bfd_elf,size_dynamic_sections)): Remove parameter export_dynamic, instead use member in parameter info. * bfd-in.h (bfd_elf32_size_dynamic_sections, bfd_elf64_size_dynamic_sections): Update prototype. * bfd-in2.h: Regenerate.
* 2001-06-18 H.J. Lu <hjl@gnu.org>H.J. Lu2001-06-182-3/+41
| | | | | | | | * elflink.h (elf_info_failed): Add a new field, verdefs. (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to elf_export_symbol. (elf_export_symbol): Check eif->verdefs to decide if a symbol should be exported.
* 2001-06-17 H.J. Lu <hjl@gnu.org>H.J. Lu2001-06-172-8/+55
| | | | | | | | | | | | | | | | | | * elf32-mips.c (mips_elf_link_hash_entry): Add a new field, readonly_reloc, to record if a relocation in the .rel.dyn section is against a read-only section. (mips_elf_link_hash_newfunc): Initialize the readonly_reloc field to false. (_bfd_mips_elf_check_relocs): Record if there is a relocation in the .rel.dyn section against a read-only section by setting DF_TEXTREL or readonly_reloc. (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if it is true. (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if there is a relocation in the .rel.dyn section against a read-only section. (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if DF_TEXTREL is set.