Michael Snyder
2d4f3e92ff
2007-07-26 Michael Snyder <msnyder@access-company.com>
...
* linker.c (already_linked_newfunc): Check for NULL return from
bfd_hash_allocate.
2007-07-26 21:53:35 +00:00
Michael Snyder
ac38308c95
2007-07-26 Michael Snyder <msnyder@access-company.com>
...
* coffgen.c (fixup_symbol_value): Guard against null;
bfd_is_com_section will dereference the section pointer.
2007-07-26 19:06:12 +00:00
Michael Snyder
c82a7c57df
2007-07-26 Michael Snyder <msnyder@access-company.com>
...
* syms.c (bfd_decode_symclass): Guard against NULL, since
bfd_is_com_section dereferences the pointer.
2007-07-26 18:53:51 +00:00
Michael Snyder
3d7b34d85b
2007-07-26 Michael Snyder <msnyder@access-company.com>
...
* srec.c (srec_scan): Check for EOF (critical because return value
will be used as array index).
2007-07-26 18:45:13 +00:00
Michael Snyder
44c62d9e24
2007-07-26 Michael Snyder <msnyder@access-company.com>
...
* coffgen.c (_bfd_coff_read_internal_relocs): If internal_relocs
are not to be cached, free the temporary buffer.
2007-07-26 18:43:24 +00:00
Michael Snyder
078c4bfc87
2007-07-26 Michael Snyder <msnyder@access-company.com>
...
* aoutx.h (slurp_reloc_table): Return TRUE if reloc_size == zero
or count == zero.
2007-07-26 18:30:28 +00:00
Michael Snyder
814b5378b4
2007-07-26 Michael Snyder <msnyder@access-company.com>
...
* tekhex.c (first_phase): Check return value for null.
2007-07-26 18:18:07 +00:00
Michael Snyder
b7fd5ce17d
2007-07-26 Michael Snyder <msnyder@access-company.com>
...
* elf.c (_bfd_elf_get_synthetic_symtab): Remove meaningless
pointer increment.
2007-07-26 18:15:46 +00:00
Alan Modra
33774f084b
* elflink.c (_bfd_elf_fix_symbol_flags): Remove unnecessary
...
check on dynobj. Remove bed shadow.
2007-07-26 13:45:59 +00:00
Alan Modra
e62071b60e
* srec.c (srec_get_section_contents): Return immediately on
...
count zero. Check that offset and count are within section.
* libbfd.c (_bfd_generic_get_section_contents): Check that
offset + count does not overflow.
2007-07-26 12:34:43 +00:00
Alan Modra
b9da616afe
* srec.c (srec_canonicalize_symtab): Don't alloc when symcount
...
is zero. Correct return value on error.
* mmo.c (mmo_canonicalize_symtab): Likewise.
* binary.c (binary_canonicalize_symtab) Correct return on error.
2007-07-26 11:13:59 +00:00
Thiemo Seufer
c2c966314b
* bfd.c (_bfd_set_gp_value): Use abort instead of BFD_FAIL.
2007-07-26 11:05:23 +00:00
Alan Modra
d494715016
* reloc.c (bfd_generic_get_relocated_section_contents): Avoid
...
bfd_canonicalize_reloc call when bfd_get_reloc_upper_bound
says there are no relocs.
2007-07-26 09:37:13 +00:00
Nick Clifton
bd210d54db
Speed up bfd_dwarf2_find_line.
...
* dwarf2.c (struct dwarf2_debug): Add new fields to support function and variable info hash tables. Add last_comp_unit, info_hash_count, funcinfo_hash_table, varinfo_hash_table, hash_units_head.
(struct comp_unit): Add prev_unit, cached.
(struct info_list_node, struct info_hash_entry, struct info_hash_table): New.
(info_hash_table_newfunc, create_info_hash_table, insert_info_hash_table, lookup_info_hash_table): New functions implementing function and variable info hash tables.
(scan_unit_for_symbols): Add checks to make sure hash tables are consistent with compilation units.
(comp_unit_maybe_decode_line_info): New function.
(comp_unit_find_line): Use comp_unit_maybe_decode_line_info.
(reverse_funcinfo_list, reverse_varinfo_list, comp_unit_hash_info, info_hash_lookup_funcinfo, info_hash_lookup_varinfo, stash_maybe_update_info_hash_table, stash_verify_info_hash_table, stash_maybe_enable_info_hash_tables, stash_find_line_fast): New functions. Make use of info hash tables to speed up bfd_dwarf2_find_line.
(find_line): Use hash table for faster lookup if it is turned on.
Also add code to maintain bi-directional link in comp units.
2007-07-26 08:31:03 +00:00
Michael Snyder
353c55748a
2007-07-25 Michael Snyder <msnyder@access-company.com>
...
* coffgen.c (_bfd_coff_get_external_symbols): Nothing to be done
if size == 0; return and avoid possible null pointer issues.
2007-07-26 02:01:49 +00:00
Alan Modra
f08c429c32
warning fix
2007-07-24 23:38:13 +00:00
Michael Snyder
f6eea5aed8
2007-07-23 Michael Snyder <msnyder@access-company.com>
...
* opncls.c (bfd_make_writable): Check return from bfd_malloc.
2007-07-24 19:58:06 +00:00
Michael Snyder
d0f16d5ece
2007-07-24 Michael Snyder <msnyder@access-company.com>
...
* elflink.c (bfd_elf_final_link): Avoid redundant frees -- return
on bfd_malloc error rather than goto error_return.
2007-07-24 19:54:01 +00:00
Alan Modra
4d269e42e3
* elflink.c (_bfd_elf_link_just_syms, merge_sections_remove_hook,
...
_bfd_elf_merge_sections, _bfd_elf_link_hash_newfunc,
_bfd_elf_link_hash_copy_indirect, _bfd_elf_link_hash_hide_symbol,
_bfd_elf_link_hash_table_init, _bfd_elf_link_hash_table_create,
bfd_elf_set_dt_needed_name, bfd_elf_get_dyn_lib_class,
bfd_elf_set_dyn_lib_class, bfd_elf_get_needed_list,
bfd_elf_get_runpath_list, bfd_elf_get_dt_soname,
bfd_elf_get_bfd_needed_list, struct elf_symbuf_symbol,
struct elf_symbuf_head, struct elf_symbol, elf_sort_elf_symbol,
elf_sym_name_compare, elf_create_symbuf,
bfd_elf_match_symbols_in_sections,
_bfd_elf_match_sections_by_type): Move to here..
* elf.c: ..from here.
2007-07-24 08:09:20 +00:00
Richard Sandiford
a26587bab5
bfd/
...
* elflink.c (_bfd_elf_fix_symbol_flags): Only assert the type
of weakdef->root.type if weakdef has no regular definition.
ld/testsuite/
* ld-elf/weak-dyn-1a.s, ld-elf/weak-dyn-1b.s, ld-elf/weak-dyn-1.ld,
* ld-elf/weak-dyn-1.rd: New test.
* ld-elf/elf.exp: Run it.
2007-07-23 09:56:19 +00:00
Adam Nemet
0e53d9daab
* elfxx-mips.c (struct mips_elf_link_hash_table): Add new field
...
small_data_overflow_reported.
(_bfd_mips_elf_link_hash_table_create): Initialize it.
(_bfd_mips_elf_relocate_section) <bfd_reloc_overflow>: Report
small-data section overflow.
2007-07-22 16:45:06 +00:00
Nick Clifton
6b33789f61
PR binutils/4797
...
* dwarf2.c: (find_line) Do not dereference functionname_ptr if do_line is true.
2007-07-19 16:51:10 +00:00
Bob Wilson
13161072f2
* elf32-xtensa.c (xtensa_callback_required_dependence): Ignore
...
non-ELF sections.
2007-07-18 21:06:06 +00:00
Bob Wilson
e29297b73c
* elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Get section
...
vma and size for dynamic tags from the output sections.
2007-07-18 18:23:47 +00:00
Alan Modra
a5d1b3b53e
* elf-bfd.h (struct sym_sec_cache): Delete "sec". Add "shndx".
...
* elf.c (bfd_section_from_r_symndx): Don't cache bfd section of
symbol. Instead cache ELF section index. Remove redundant
checks of st_shndx.
2007-07-18 11:23:37 +00:00
Mike Frysinger
d955dada99
* trad-core.c (NBPG): If not defined, set to getpagesize().
2007-07-15 06:33:34 +00:00
Roland McGrath
979dc3bca9
.
2007-07-13 10:44:44 +00:00
Nick Clifton
d2df793a71
Add support for building on a 64-bit Windows host.
2007-07-12 07:16:41 +00:00
H.J. Lu
a3a4ddad29
2007-07-10 H.J. Lu <hongjiu.lu@intel.com>
...
* Makefile.in: Regenerated.
2007-07-10 15:03:03 +00:00
H.J. Lu
329b43c490
2007-07-10 H.J. Lu <hongjiu.lu@intel.com>
...
PR binutils/4756
* simple.c (bfd_simple_get_relocated_section_content): Don't
apply relocation on executable and shared library.
2007-07-10 13:49:04 +00:00
Nathan Sidwell
cfd2c77310
* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't eliminate
...
copy relocs on vxworks.
2007-07-10 07:42:30 +00:00
Alan Modra
1489a3a0d7
* elf32-arm.c (elf32_arm_size_info): Init checksum_contents field.
...
* elf64-alpha.c (alpha_elf_size_info): Likewise.
* elf64-hppa.c (hppa64_elf_size_info): Likewise.
* elf64-mips.c (mips_elf64_size_info): Likewise.
* elf64-s390.c (s390_elf64_size_info): Likewise.
* elf64-sparc.c (elf64_sparc_size_info): Likewise.
2007-07-10 04:08:12 +00:00
H.J. Lu
00cbee0aa8
2007-07-09 H.J. Lu <hongjiu.lu@intel.com>
...
* elflink.c (bfd_elf_record_link_assignment): Handle indirect
symbol.
(_bfd_elf_merge_symbol): Properly update normal symbol when
overriding the versioned symbol from a dynamic library.
2007-07-10 02:40:31 +00:00
Roland McGrath
fd2f25da9b
.
2007-07-09 21:25:39 +00:00
Alan Modra
9af2a943ee
* elflink.c (elf_link_add_object_symbols): Return via
...
error_free_vers on "notice" failure.
2007-07-06 02:29:10 +00:00
H.J. Lu
a93221e521
2007-07-04 H.J. Lu <hongjiu.lu@intel.com>
...
* peicode.h (pe_bfd_object_p): Don't check PE vs. EFI target
if arch is unknown.
2007-07-05 02:50:02 +00:00
Nick Clifton
b49281938d
* elf32-mep.c (mep_final_link_relocate) [R_MEP_HI16S]: Correctly compensate
...
for high bit set in R_MEP_LOW16.
2007-07-04 14:23:22 +00:00
Joseph Myers
3cfad14c4a
bfd:
...
* elf32-arm.c (elf32_arm_merge_eabi_attributes): Copy type from
input attributes if value has been copied.
ld/testsuite:
* ld-arm/attr-merge-2a.s, ld-arm/attr-merge-2b.s,
ld-arm/attr-merge-2.attr: New.
* ld-arm/arm-elf.exp (armelftests): Add new test.
2007-07-03 15:21:30 +00:00
Nick Clifton
cd123cb70c
Switch sources over to use the GPL version 3
2007-07-03 14:26:43 +00:00
Joseph Myers
741d6ea85b
bfd:
...
* elfxx-mips.c (mips_elf_calculate_relocation): Handle
R_MIPS_TLS_DTPREL32 and R_MIPS_TLS_DTPREL64.
* elf64-mips.c (mips_elf64_howto_table_rela): Support
R_MIPS_TLS_DTPREL64.
gas:
* config/tc-mips.c (s_dtprelword, s_dtpreldword,
s_dtprel_internal): New.
(mips_pseudo_table): Add .dtprelword and .dtpreldword.
(md_apply_fix): Handle BFD_RELOC_MIPS_TLS_DTPREL32 and
BFD_RELOC_MIPS_TLS_DTPREL64.
2007-07-02 10:49:42 +00:00
Alan Modra
ae351704e2
Regenerate files.
2007-07-02 07:12:53 +00:00
Alan Modra
3e5484dbb9
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Tidy
...
symsec != NULL tests.
2007-07-02 06:51:57 +00:00
Alan Modra
08a40648e5
PR 4712
...
* elf.c (assign_file_positions_for_load_sections): Adjust lma
by p_vaddr_offset.
2007-07-02 06:47:43 +00:00
H.J. Lu
86b57e315d
bfd/
...
2007-06-30 H.J. Lu <hongjiu.lu@intel.com>
* aclocal.m4: Regenerated.
* Makefile.in: Likewise.
bfd/doc/
2007-06-30 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.in: Likewise.
binutils/
2007-06-30 H.J. Lu <hongjiu.lu@intel.com>
* aclocal.m4: Regenerated.
* doc/Makefile.in: Likewise.
* Makefile.in: Likewise.
gas/
2007-06-30 H.J. Lu <hongjiu.lu@intel.com>
* aclocal.m4: Regenerated.
* doc/Makefile.in: Likewise.
* Makefile.in: Likewise.
gprof/
2007-06-30 H.J. Lu <hongjiu.lu@intel.com>
* aclocal.m4: Regenerated.
* Makefile.in: Likewise.
ld/
2007-06-30 H.J. Lu <hongjiu.lu@intel.com>
* aclocal.m4: Regenerated.
* Makefile.in: Likewise.
opcodes/
2007-06-30 H.J. Lu <hongjiu.lu@intel.com>
* aclocal.m4: Regenerated.
* Makefile.in: Likewise.
2007-06-30 17:21:16 +00:00
Joseph Myers
34c8bcbae2
bfd:
...
* elf32-ppc.c (ppc_elf_merge_obj_attributes): New.
(ppc_elf_merge_private_bfd_data): Call it.
binutils:
* readelf.c (display_power_gnu_attribute, process_power_specific):
New.
(process_arch_specific): Call process_power_specific.
include/elf:
* ppc.h (Tag_GNU_Power_ABI_FP): Define.
ld/testsuite:
* ld-powerpc/attr-gnu-4-0.s, ld-powerpc/attr-gnu-4-00.d,
ld-powerpc/attr-gnu-4-01.d, ld-powerpc/attr-gnu-4-02.d,
ld-powerpc/attr-gnu-4-1.s, ld-powerpc/attr-gnu-4-10.d,
ld-powerpc/attr-gnu-4-11.d, ld-powerpc/attr-gnu-4-12.d,
ld-powerpc/attr-gnu-4-13.d, ld-powerpc/attr-gnu-4-2.s,
ld-powerpc/attr-gnu-4-20.d, ld-powerpc/attr-gnu-4-21.d,
ld-powerpc/attr-gnu-4-22.d, ld-powerpc/attr-gnu-4-3.s,
ld-powerpc/attr-gnu-4-31.d: New.
* ld-powerpc/powerpc.exp: Run these new tests.
2007-06-30 00:03:40 +00:00
Joseph Myers
2cf19d5cb9
bfd:
...
* elfxx-mips.c (mips_elf_merge_obj_attributes): New.
(_bfd_mips_elf_merge_private_bfd_data): Call it.
binutils:
* readelf.c (display_mips_gnu_attribute): New.
(process_mips_specific): Call process_attributes.
include/elf:
* mips.h (Tag_GNU_MIPS_ABI_FP): Define.
ld/testsuite:
* ld-mips-elf/attr-gnu-4-0.s, ld-mips-elf/attr-gnu-4-00.d,
ld-mips-elf/attr-gnu-4-01.d, ld-mips-elf/attr-gnu-4-02.d,
ld-mips-elf/attr-gnu-4-03.d, ld-mips-elf/attr-gnu-4-1.s,
ld-mips-elf/attr-gnu-4-10.d, ld-mips-elf/attr-gnu-4-11.d,
ld-mips-elf/attr-gnu-4-12.d, ld-mips-elf/attr-gnu-4-13.d,
ld-mips-elf/attr-gnu-4-14.d, ld-mips-elf/attr-gnu-4-2.s,
ld-mips-elf/attr-gnu-4-20.d, ld-mips-elf/attr-gnu-4-21.d,
ld-mips-elf/attr-gnu-4-22.d, ld-mips-elf/attr-gnu-4-23.d,
ld-mips-elf/attr-gnu-4-3.s, ld-mips-elf/attr-gnu-4-30.d,
ld-mips-elf/attr-gnu-4-31.d, ld-mips-elf/attr-gnu-4-32.d,
ld-mips-elf/attr-gnu-4-33.d, ld-mips-elf/attr-gnu-4-4.s,
ld-mips-elf/attr-gnu-4-41.d: New.
* ld-mips-elf/mips-elf.exp: Run these new tests.
2007-06-29 16:41:32 +00:00
Joseph Myers
104d59d19c
bfd:
...
* elf-attrs.c: New.
* Makefile.am (BFD32_BACKENDS): Add elf-attrs.lo.
(BFD32_BACKENDS_CFILES): Add elf-attrs.c.
(elf-attrs.lo): Generate dependencies.
* Makefile.in: Regenerate.
* configure.in (elf): Add elf-attrs.lo.
* configure: Regenerate.
* elf-bfd.h (struct elf_backend_data): Add entries for object
attributes.
(NUM_KNOWN_OBJ_ATTRIBUTES, obj_attribute, obj_attribute_list,
OBJ_ATTR_PROC, OBJ_ATTR_GNU, OBJ_ATTR_FIRST, OBJ_ATTR_LAST,
Tag_NULL, Tag_File, Tag_Section, Tag_Symbol, Tag_compatibility):
New.
(struct elf_obj_tdata): Add entries for object attributes.
(elf_known_obj_attributes, elf_other_obj_attributes,
elf_known_obj_attributes_proc, elf_other_obj_attributes_proc):
New.
(bfd_elf_obj_attr_size, bfd_elf_set_obj_attr_contents,
bfd_elf_get_obj_attr_int, bfd_elf_add_obj_attr_int,
bfd_elf_add_proc_attr_int, bfd_elf_add_obj_attr_string,
bfd_elf_add_proc_attr_string, bfd_elf_add_obj_attr_compat,
bfd_elf_add_proc_attr_compat, _bfd_elf_attr_strdup,
_bfd_elf_copy_obj_attributes, _bfd_elf_obj_attrs_arg_type,
_bfd_elf_parse_attributes, _bfd_elf_merge_object_attributes): New.
* elf.c (_bfd_elf_copy_private_bfd_data): Copy object attributes.
(bfd_section_from_shdr): Handle attributes sections.
* elflink.c (bfd_elf_final_link): Handle attributes sections.
* elfxx-target.h (elf_backend_obj_attrs_vendor,
elf_backend_obj_attrs_section, elf_backend_obj_attrs_arg_type,
elf_backend_obj_attrs_section_type): New.
(elfNN_bed): Update.
* elf32-arm.c (NUM_KNOWN_ATTRIBUTES, aeabi_attribute,
aeabi_attribute_list): Remove.
(struct elf32_arm_obj_tdata): Remove object attributes fields.
(check_use_blx, bfd_elf32_arm_set_vfp11_fix, using_thumb2,
elf32_arm_copy_private_bfd_data, elf32_arm_merge_eabi_attributes):
Update for new object attributes interfaces.
(uleb128_size, is_default_attr, eabi_attr_size,
elf32_arm_eabi_attr_size, write_uleb128, write_eabi_attribute,
elf32_arm_set_eabi_attr_contents, elf32_arm_bfd_final_link,
elf32_arm_new_eabi_attr, elf32_arm_get_eabi_attr_int,
elf32_arm_add_eabi_attr_int, attr_strdup,
elf32_arm_add_eabi_attr_string, elf32_arm_add_eabi_attr_compat,
copy_eabi_attributes, elf32_arm_parse_attributes): Remove. Moved
to generic code in elf-attrs.c.
(elf32_arm_obj_attrs_arg_type): New.
(elf32_arm_fake_sections): Do not handle .ARM.attributes.
(elf32_arm_section_from_shdr): Do not handle SHT_ARM_ATTRIBUTES.
(bfd_elf32_bfd_final_link): Remove.
(elf_backend_obj_attrs_vendor, elf_backend_obj_attrs_section,
elf_backend_obj_attrs_arg_type,
elf_backend_obj_attrs_section_type): New.
* elf32-bfin.c (bfin_elf_copy_private_bfd_data): Copy object
attributes.
* elf32-frv.c (frv_elf_copy_private_bfd_data): Likewise.
* elf32-iq2000.c (iq2000_elf_copy_private_bfd_data): Likewise.
* elf32-mep.c (mep_elf_copy_private_bfd_data): Likewise.
* elf32-mt.c (mt_elf_copy_private_bfd_data): Likewise.
* elf32-sh.c (sh_elf_copy_private_data): Likewise.
* elf64-sh64.c (sh_elf64_copy_private_data_internal): Likewise.
binutils:
* readelf.c (display_gnu_attribute): New.
(process_arm_specific): Rearrange as process_attributes.
(process_arm_specific): Replace by wrapper of process_attributes.
gas:
* as.c (create_obj_attrs_section): New.
(main): Call create_obj_attrs_section for ELF.
* read.c (s_gnu_attribute, skip_whitespace, skip_past_char,
skip_past_comma, s_vendor_attribute): New.
(potable): Add gnu_attribute for ELF.
* read.h (s_vendor_attribute): Declare.
* config/tc-arm.c (s_arm_eabi_attribute): Replace by wrapper
round s_vendor_attribute.
(aeabi_set_public_attributes): Update for new attributes
interfaces.
(arm_md_end): Remove attributes contents setting now done
generically.
include/elf:
* arm.h (elf32_arm_add_eabi_attr_int,
elf32_arm_add_eabi_attr_string, elf32_arm_add_eabi_attr_compat,
elf32_arm_get_eabi_attr_int, elf32_arm_set_eabi_attr_contents,
elf32_arm_eabi_attr_size, Tag_NULL, Tag_File, Tag_Section,
Tag_Symbol, Tag_compatibility): Remove.
* common.h (SHT_GNU_ATTRIBUTES): Define.
ld:
* emulparams/armelf.sh (OTHER_SECTIONS): Remove .ARM.attributes.
(ATTRS_SECTIONS): Define.
* scripttempl/elf.sc, scripttempl/elf32sh-symbian.sc,
scripttempl/elf_chaos.sc, scripttempl/elfi370.sc,
scripttempl/elfxtensa.sc: Handle ATTRS_SECTIONS.
2007-06-29 16:29:17 +00:00
Paul Brook
5ab7998193
2007-06-29 Paul Brook <paul@codesourcery.com>
...
bfd/
* elf32-arm.c (bfd_elf32_arm_process_before_allocation): Suppress
call veneers for call relocations against undefined symbols.
(elf32_arm_final_link_relocate): Turn call to undefined symbol
into a jump to the next instruction.
ld/testuite/
* ld-arm/arm-elf.exp (armelftests): Add callweak.
* ld-arm/callweak.d: New test.
* ld-arm/callweak.s: New test.
2007-06-29 15:05:47 +00:00
Nick Clifton
32e8a950c4
* bfd.c (bfd_demangle): Plug memory leak (Coverity).
2007-06-29 14:36:21 +00:00
Nick Clifton
3d3d428f04
New port: National Semiconductor's CR16
2007-06-29 14:09:34 +00:00