OSDN Git Service

pf3gnuchains/pf3gnuchains3x.git
15 years ago * dwarf.c (display_debug_ranges): Add the base address to the
Nick Clifton [Fri, 27 Mar 2009 14:27:02 +0000 (14:27 +0000)]
    * dwarf.c (display_debug_ranges): Add the base address to the
        displayed values for 'Begin' and 'End'.

15 years ago * djunpack.bat: Use ".." quoting in Sed command, for the sake of
Eli Zaretskii [Fri, 27 Mar 2009 13:37:09 +0000 (13:37 +0000)]
* djunpack.bat: Use ".." quoting in Sed command, for the sake of
Windows builds of Sed.

15 years ago * section.c (bfd_get_section_contents): Detect and handle the case
Nick Clifton [Fri, 27 Mar 2009 11:38:30 +0000 (11:38 +0000)]
    * section.c (bfd_get_section_contents): Detect and handle the case
        where a section has the SEC_IN_MEMORY flag set but no actual
        contents allocated.

15 years agoRemove merge markers
Nick Clifton [Fri, 27 Mar 2009 08:26:18 +0000 (08:26 +0000)]
Remove merge markers

15 years ago2009-03-26 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Fri, 27 Mar 2009 00:28:32 +0000 (00:28 +0000)]
2009-03-26  H.J. Lu  <hongjiu.lu@intel.com>

* i386-dis.c (get_valid_dis386): Abort on unhandled table.

15 years agodaily update
Alan Modra [Fri, 27 Mar 2009 00:00:10 +0000 (00:00 +0000)]
daily update

15 years ago2009-03-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Ramana Radhakrishnan [Thu, 26 Mar 2009 13:59:28 +0000 (13:59 +0000)]
2009-03-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

        * gas/arm/wince_inst.d: Convert to unified syntax.

15 years ago PR 6494
Alan Modra [Thu, 26 Mar 2009 12:23:52 +0000 (12:23 +0000)]
PR 6494
* elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
p_filesz and p_memsz are equal.  Use p_memsz as the segment size.
(assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
if we don't find matching PT_LOAD when copying.

15 years ago PR 10005
Alan Modra [Thu, 26 Mar 2009 02:41:12 +0000 (02:41 +0000)]
PR 10005
* config/tc-i386.c (reloc): Don't abort on lack of required
reloc type.

15 years agodaily update
Alan Modra [Thu, 26 Mar 2009 00:00:04 +0000 (00:00 +0000)]
daily update

15 years ago2009-03-25 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Wed, 25 Mar 2009 19:49:25 +0000 (19:49 +0000)]
2009-03-25  H.J. Lu  <hongjiu.lu@intel.com>

* config/tc-i386.c (parse_insn): Use default_arch on unsupported
arch.

15 years ago2009-03-25 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
M R Swami Reddy [Wed, 25 Mar 2009 08:08:36 +0000 (08:08 +0000)]
2009-03-25  M R Swami Reddy <MR.Swami.Reddy@nsc.com>

        * elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
        the reloc descriptions.

15 years ago2009-03-25 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
M R Swami Reddy [Wed, 25 Mar 2009 08:05:57 +0000 (08:05 +0000)]
2009-03-25  M R Swami Reddy <MR.Swami.Reddy@nsc.com>

* elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
the reloc descriptions.

15 years ago * ld-cris/tls-e-dtpoffd3.d, ld-cris/tls-e-tpoffcomm1.d,
Hans-Peter Nilsson [Wed, 25 Mar 2009 03:04:21 +0000 (03:04 +0000)]
* ld-cris/tls-e-dtpoffd3.d, ld-cris/tls-e-tpoffcomm1.d,
ld-cris/tls-e-tpoffcomm1.s: New tests.

15 years ago * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
Hans-Peter Nilsson [Wed, 25 Mar 2009 03:03:40 +0000 (03:03 +0000)]
* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
<R_CRIS_16_GOT_GD, case R_CRIS_32_GOT_GD>: Handle COMMON symbols.
<case R_CRIS_16_TPREL, R_CRIS_32_TPREL>: Ditto.

15 years ago * readelf.c (process_file_header): Don't report a corrupt string
Alan Modra [Wed, 25 Mar 2009 01:37:18 +0000 (01:37 +0000)]
* readelf.c (process_file_header): Don't report a corrupt string
table index if it is zero.

15 years ago * symtab.h (needs_plt_entry): Check for unsatisfied reference from
Cary Coutant [Wed, 25 Mar 2009 01:34:25 +0000 (01:34 +0000)]
* symtab.h (needs_plt_entry): Check for unsatisfied reference from
an executable.
(needs_dynamic_reloc): Likewise.

15 years agodaily update
Alan Modra [Wed, 25 Mar 2009 00:00:09 +0000 (00:00 +0000)]
daily update

15 years ago * yyscript.y (file_cmd): Recognize EXTERN.
Ian Lance Taylor [Tue, 24 Mar 2009 19:08:37 +0000 (19:08 +0000)]
* yyscript.y (file_cmd): Recognize EXTERN.
(extern_name_list, extern_name_list_body): New nonterminals.
* script.cc (script_add_extern): Define.
* script-c.h (script_add_extern): Declare.

15 years ago * object.cc (is_elf_object): Define.
Ian Lance Taylor [Tue, 24 Mar 2009 18:42:10 +0000 (18:42 +0000)]
* object.cc (is_elf_object): Define.
* object.h (is_elf_object): Declare.
* archive.cc (Archive::get_elf_object_for_member): Call
is_elf_object.
* readsymc.cc (Read_symbols::do_read_symbols): Likewise.

15 years ago2009-03-24 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Tue, 24 Mar 2009 18:07:14 +0000 (18:07 +0000)]
2009-03-24  H.J. Lu  <hongjiu.lu@intel.com>

* cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static.
(bfd_i386_arch_intel_syntax): Likewise.
(i8086_arch): Likewise.
(bfd_x86_64_arch): Likewise.

15 years ago * output.cc (Output_file::map_anonymous): Define.
Ian Lance Taylor [Tue, 24 Mar 2009 18:04:26 +0000 (18:04 +0000)]
* output.cc (Output_file::map_anonymous): Define.
(Output_file::map): Use map_anonymous.  If the regular mmap fails,
try an anonymous one.  Report the size if the mmap fails.
* output.h (class Output_file): Declare map_anonymous.

15 years ago * target-select.cc (instantiate_target): Don't acquire the lock if
Ian Lance Taylor [Tue, 24 Mar 2009 17:32:43 +0000 (17:32 +0000)]
* target-select.cc (instantiate_target): Don't acquire the lock if
the instantiated_target_ field has already been set.

15 years ago * ld-cris/tls-commx.s, ld-cris/tls-dso-dtpoffd2.d,
Hans-Peter Nilsson [Tue, 24 Mar 2009 07:58:23 +0000 (07:58 +0000)]
* ld-cris/tls-commx.s, ld-cris/tls-dso-dtpoffd2.d,
ld-cris/tls-dso-dtpoffd4.d, ld-cris/tls-dtpoffdx.s,
ld-cris/tls-e-dtpoffd1.d: New tests.

15 years ago * elf32-cris.c (cris_elf_relocate_section): <case
Hans-Peter Nilsson [Tue, 24 Mar 2009 07:57:21 +0000 (07:57 +0000)]
* elf32-cris.c (cris_elf_relocate_section): <case
R_CRIS_16_DTPREL, R_CRIS_32_DTPREL>: Allow use of non-local
symbols for non-allocated sections.  Don't check whether to
generate R_CRIS_DTPMOD for non-allocated sections.
(cris_elf_gc_sweep_hook) <case R_CRIS_32_DTPREL>: Don't
handle relocation GC:ing if applied to non-allocated section.
(cris_elf_check_relocs): Similar.

15 years ago2009-03-23 Ian Lance Taylor <iant@google.com>
Ian Lance Taylor [Tue, 24 Mar 2009 04:50:32 +0000 (04:50 +0000)]
2009-03-23  Ian Lance Taylor  <iant@google.com>

* gold-threads.h (class Initialize_lock): Define.
* gold-threads.cc (class Initialize_lock_once): Define.
(initialize_lock_control): New static variable.
(initialize_lock_pointer): New static variable.
(initialize_lock_once): New static function.
(Initialize_lock::Initialize_lock): Define.
(Initialize_lock::initialize): Define.
* target-select.h: Include "gold-threads.h".
(class Target_selector): Add lock_ and initialize_lock_ fields.
Don't define instantiate_target, just declare it.
* target-select.cc (Target_selector::Target_selector): Initialize
new fields.
(Target_selector::instantiate_target): Define.
* descriptors.h: Include "gold-threads.h".
(class Descriptors): Add initialize_lock_ field.
* descriptors.cc (Descriptors::Descriptors): Initialize new
field.
(Descriptors::open): Use initialize_lock_ field
* errors.h (class Errors): Add initialize_lock_ field.
* errors.cc (Errors::Errors): Initialize new field.
(Errors::initialize_lock): Use initialize_lock_ field.
* powerpc.cc (class Target_selector_powerpc): Remove
instantiated_target_ field.  In do_recognize call
instantiate_target rather than do_instantiate_target.  In
do_instantiate_target just allocate a new target.
* sparc.cc (class Target_selector_sparc): Likewise.

15 years ago * ld-cris/tls-e-20.d, ld-cris/tls-e-20a.d, ld-cris/tls-e-21.d,
Hans-Peter Nilsson [Tue, 24 Mar 2009 03:34:05 +0000 (03:34 +0000)]
* ld-cris/tls-e-20.d, ld-cris/tls-e-20a.d, ld-cris/tls-e-21.d,
ld-cris/tls-e-80.d, ld-cris/tls-gd-3.d, ld-cris/tls-gd-3h.d,
ld-cris/tls-global-74.d, ld-cris/tls-ldgde-14.d,
ld-cris/tls-ldgde-15.d, ld-cris/tls-legd-16.d,
ld-cris/tls-legd-17.d, ld-cris/tls-local-57.d,
ld-cris/tls-local-58.d, ld-cris/tls-local-59.d: Adjust for BFD
change in link-time known GOT contents for GD relocations.

15 years ago * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
Hans-Peter Nilsson [Tue, 24 Mar 2009 03:32:31 +0000 (03:32 +0000)]
* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
<R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: Don't include the TLS size
when emitting a known TP offset in the GOT.

15 years ago2009-03-23 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Tue, 24 Mar 2009 01:04:25 +0000 (01:04 +0000)]
2009-03-23  H.J. Lu  <hongjiu.lu@intel.com>

PR gas/9966
* listing.c (listing_newline): Properly handle `\\"' and ';'.

* read.c (is_end_of_line): Update comments for line separator.
(read_begin): Set line separator in is_end_of_line to 2.

15 years ago2009-03-23 Ian Lance Taylor <iant@google.com>
Ian Lance Taylor [Tue, 24 Mar 2009 00:31:29 +0000 (00:31 +0000)]
2009-03-23  Ian Lance Taylor  <iant@google.com>

* freebsd.h: New file.
* i386.cc: Include "freebsd.h".
(Target_i386): Derive from Target_freebsd rather than
Sized_target.
(Target_selector_i386): Derive from Target_selector_freebsd rather
than Target_selector.
* x86_64.cc: Include "freebsd.h".
(Target_x86_64): Derive from Target_freebsd rather than
Sized_target.
(Target_selector_x86_64): Derive from Target_selector_freebsd
rather than Target_selector.
* target.h (class Target): Add adjust_elf_header and
do_adjust_elf_header.
* output.cc (Output_file_header:: do_sized_write): Call target
adjust_elf_header routine.
* configure.tgt: Set targ_osabi.
* configure.ac: Define GOLD_DEFAULT_OSABI.
* parameters.cc (Parameters::default_target): Pass
GOLD_DEFAULT_OSABI to select_target.
* target-select.h (class Target_selector): Make instantiate_target
protected rather than private.
* Makefile.am (HFILES): Add freebsd.h.
* configure, Makefile.in, config.in: Rebuild.

15 years agodaily update
Alan Modra [Tue, 24 Mar 2009 00:00:04 +0000 (00:00 +0000)]
daily update

15 years agomerge from gcc
DJ Delorie [Mon, 23 Mar 2009 22:05:12 +0000 (22:05 +0000)]
merge from gcc

15 years ago * merge.cc (do_add_input_section): Correct pend value. Change
Ian Lance Taylor [Mon, 23 Mar 2009 21:15:08 +0000 (21:15 +0000)]
* merge.cc (do_add_input_section): Correct pend value.  Change
message about last entry not being null terminated from error to
warning.

15 years ago * elf64-ppc.c (synthetic_opd): Delete.
Alan Modra [Mon, 23 Mar 2009 13:35:46 +0000 (13:35 +0000)]
* elf64-ppc.c (synthetic_opd): Delete.
(compare_symbols): Look for .opd name rather than section match.
(ppc64_elf_get_synthetic_symtab): Likewise.

15 years agodaily update
Alan Modra [Mon, 23 Mar 2009 00:00:05 +0000 (00:00 +0000)]
daily update

15 years agodaily update
Alan Modra [Sun, 22 Mar 2009 00:00:04 +0000 (00:00 +0000)]
daily update

15 years ago * elf32-ppc.c (is_pic_glink_stub): Delete.
Alan Modra [Sat, 21 Mar 2009 02:35:27 +0000 (02:35 +0000)]
* elf32-ppc.c (is_pic_glink_stub): Delete.
(is_nonpic_glink_stub): New function.
(ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather
than first pic one.
(struct ppc_elf_link_hash_table <glink_pltresolve>): Comment fix.

15 years agodaily update
Alan Modra [Sat, 21 Mar 2009 00:00:04 +0000 (00:00 +0000)]
daily update

15 years agoinclude/elf:
Ian Lance Taylor [Fri, 20 Mar 2009 23:37:51 +0000 (23:37 +0000)]
include/elf:
* common.h (SHT_GNU_INCREMENTAL_INPUTS): Define.
elfcpp:
* elfcpp.h (SHT_GNU_INCREMENTAL_INPUTS): Define.
gold:
* incremental.cc: New file.
* Makefile.am (CCFILES): Add incremental.cc.
* Makefile.in: Rebuild.

15 years agold/
H.J. Lu [Fri, 20 Mar 2009 17:39:04 +0000 (17:39 +0000)]
ld/

2009-03-20  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/9970
* ldlang.c (lang_end): Warn missing entry symbol for -pie.

ld/testsuite/

2009-03-20  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/9970
* ld-pie/pie.exp: Use -fpie to compile.  Run *.d tests.

* ld-pie/start.d: New.
* ld-pie/start.s: Likewise.

15 years ago2009-03-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
Andreas Krebbel [Fri, 20 Mar 2009 12:57:15 +0000 (12:57 +0000)]
2009-03-20  Martin Schwidefsky  <schwidefsky@de.ibm.com>
    Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

* elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
        macros for visibilty and locality checks.
(elf_s390_adjust_dynamic_symbol): Likewise.
(allocate_dynrelocs): Likewise.
(elf_s390_relocate_section): Likewise.
(elf_s390_finish_dynamic_symbol): Likewise.
* elf64-s390.c (elf_s390_check_relocs): Likewise.
(elf_s390_adjust_dynamic_symbol): Likewise.
(allocate_dynrelocs): Likewise.
(elf_s390_relocate_section): Likewise.
(elf_s390_finish_dynamic_symbol): Likewise.

15 years ago2009-03-19 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Fri, 20 Mar 2009 00:05:37 +0000 (00:05 +0000)]
2009-03-19  H.J. Lu  <hongjiu.lu@intel.com>

* dwarf.c (dwarf_regnames): Moved before frame_need_space.
(dwarf_regnames_count): Likewise.
(frame_need_space): Return int.
(display_debug_frames): Check invalid registers.

15 years agodaily update
Alan Modra [Fri, 20 Mar 2009 00:00:04 +0000 (00:00 +0000)]
daily update

15 years ago2009-03-19 Paul Pluzhnikov <ppluzhnikov@google.com>
Paul Pluzhnikov [Thu, 19 Mar 2009 19:39:32 +0000 (19:39 +0000)]
2009-03-19  Paul Pluzhnikov  <ppluzhnikov@google.com>

* layout.cc (Layout::output_section_name): Preserve names
of '.note.' sections.

15 years ago * descriptors.cc (Descriptors::open): Check that the options are
Ian Lance Taylor [Thu, 19 Mar 2009 19:02:53 +0000 (19:02 +0000)]
* descriptors.cc (Descriptors::open): Check that the options are
valid before using them.

15 years ago2009-03-19 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Thu, 19 Mar 2009 14:42:52 +0000 (14:42 +0000)]
2009-03-19  H.J. Lu  <hongjiu.lu@intel.com>

* readelf.c (debug_apply_relocations): Check relocations
against STT_SECTION symbol.

15 years ago2009-03-19 Kai Tietz <kai.tietz@onevision.com>
Kai Tietz [Thu, 19 Mar 2009 11:02:09 +0000 (11:02 +0000)]
2009-03-19  Kai Tietz  <kai.tietz@onevision.com>

        * bfd-in2.h: Regenerated.
        * coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY
        for debugging sections and map memory read/write dependent on
        SEC_COFF_NOREAD.
        (styp_to_sec_flags): Set SEC_COFF_NOREAD for sections
        without memory read flags set.
        * section.c: Add SEC_COFF_NOREAD to section flags.

15 years ago * config/tc-sparc.c (md_parse_option): If the user gives
David S. Miller [Thu, 19 Mar 2009 10:41:46 +0000 (10:41 +0000)]
* config/tc-sparc.c (md_parse_option): If the user gives
us '--64' make sure max_architecture is at least V9.

15 years ago* elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
Andreas Schwab [Thu, 19 Mar 2009 10:40:06 +0000 (10:40 +0000)]
* elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
for format string.

15 years agobfd/
Alan Modra [Thu, 19 Mar 2009 07:04:12 +0000 (07:04 +0000)]
bfd/
* elf32-spu.c (spu_elf_find_overlays): Separate error return from
"no overlays" return.  If there are overlays, create overlay
manager entry symbols here, so that..
(spu_elf_build_stubs): ..we don't need to set them up here.
Simplify entry symbol tests.
* elf32-spu.h (spu_elf_find_overlays): Update prototype.
ld/
* emultempl/spuelf.em (spu_before_allocation): Report errors from
spu_elf_find_overlays.

15 years ago * script-sections.h: Include <list>.
Ian Lance Taylor [Thu, 19 Mar 2009 05:51:49 +0000 (05:51 +0000)]
* script-sections.h: Include <list>.
(class Script_sections): Change Sections_elements from std::vector
to std::list.  Typedef public Elements_iterator.  Add
orphan_section_placement_, data_segment_align_start_, and
saw_data_segment_align_ fields.  Remove data_segment_align_index_
field.
* script-sections.cc (class Orphan_section_placement): New class.
(class Sections_element): Add virtual functions is_relro and
orphan_section_init.  Remove virtual function place_orphan_here.
(class Output_section_definition): Add is_relro and
orphan_section_init.  Remove place_orphan_here.
(class Orphan_output_section): Likewise.
(Script_sections::Script_sections): Update for field changes.
(Script_sections::data_segment_align): Set saw_data_segment_align_
and data_segment_align_start_, not data_segment_align_index.
(Script_sections::data_segment_relro_end): Check
saw_data_segment_align_.  Use data_segment_align_start_ rather
than data_segment_align_index_.
(Script_sections::place_orphan): Rewrite to use
Orphan_section_placement.

15 years ago2009-03-18 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Thu, 19 Mar 2009 02:38:53 +0000 (02:38 +0000)]
2009-03-18  H.J. Lu  <hongjiu.lu@intel.com>

* readelf.c (debug_apply_relocations): Allow relocations
against function symbols.

15 years agodaily update
Alan Modra [Thu, 19 Mar 2009 00:00:04 +0000 (00:00 +0000)]
daily update

15 years ago * configure: Rebuild.
Tom Tromey [Wed, 18 Mar 2009 23:33:26 +0000 (23:33 +0000)]
* configure: Rebuild.
* configure.ac (host_libs): Add libiconv.
* Makefile.in: Rebuild.
* Makefile.def (host_modules): Add libiconv.
(configure-gdb, all-gdb): Depend on libiconv.

15 years ago * Makefile.am (BFD32_BACKENDS): Remove elf32-score and
Nick Clifton [Wed, 18 Mar 2009 16:58:33 +0000 (16:58 +0000)]
    * Makefile.am (BFD32_BACKENDS): Remove elf32-score and
        elf32-score7 files.
        (BFD32_BACKEND_CFILES): Likewise.
        (BFD64_BACKENDS): Add elf32-score and elf32-score7 files.
        (BFD64_BACKENDS_CFILES): Likewise.
        * Makefile.in: Regenerate.
        * config.bfd: More Score targets into BFD64 list.
        * configure.in: Move score vectors to 64-bit list.
        * targets.c: Likewise.

        * score-dis.c: Only compile when 64-bit bfds are enabled.

15 years ago* elf.c (elfcore_grok_openbsd_procinfo)
Mark Kettenis [Wed, 18 Mar 2009 16:26:54 +0000 (16:26 +0000)]
* elf.c (elfcore_grok_openbsd_procinfo)
(elfcore_grok_openbsd_note): New functions.
(elf_parse_notes): Handle notes from OpenBSD ELF core files.

15 years ago* common.h (NT_OPENBSD_PROCINFO, NT_OPENBSD_AUXV)
Mark Kettenis [Wed, 18 Mar 2009 15:57:17 +0000 (15:57 +0000)]
* common.h (NT_OPENBSD_PROCINFO, NT_OPENBSD_AUXV)
(NT_OPENBSD_REGS, NT_OPENBSD_FPREGS, NT_OPENBSD_XFPREGS)
(NT_OPENBSD_WCOOKIE): New defines.

15 years ago2009-03-18 Andrew Stubbs <ams@codesourcery.com>
Andrew Stubbs [Wed, 18 Mar 2009 15:28:24 +0000 (15:28 +0000)]
2009-03-18  Andrew Stubbs  <ams@codesourcery.com>

gas/
* config/tc-arm.c (md_apply_fix): Check BFD_RELOC_ARM_IMMEDIATE and
BFD_RELOC_ARM_ADRL_IMMEDIATE value is in the correct section.
Check BFD_RELOC_ARM_ADRL_IMMEDIATE has a defined symbol.

gas/testsuites/
* gas/arm/adr-invalid.d: New file.
* gas/arm/adr-invalid.l: New file.
* gas/arm/adr-invalid.s: New file.

15 years agold/
H.J. Lu [Wed, 18 Mar 2009 12:11:38 +0000 (12:11 +0000)]
ld/

2009-03-18  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/6766
* lexsup.c (parse_args): Call ldlang_add_undef for -e.

ld/testsuite/

2009-03-18  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/6766
* ld-undefined/dummy.s: New.
* ld-undefined/entry-1.d: Likewise.
* ld-undefined/entry-2.d: Likewise.
* ld-undefined/entry-3.d: Likewise.
* ld-undefined/entry-4.d: Likewise.
* ld-undefined/entry-5.d: Likewise.
* ld-undefined/entry-6.d: Likewise.
* ld-undefined/entry.exp: Likewise.
* ld-undefined/entry.s: Likewise.

15 years agobfd/
Alan Modra [Wed, 18 Mar 2009 11:47:18 +0000 (11:47 +0000)]
bfd/
* vms-hdr.c: Don't include alloca.h.
opcodes/
* cgen-opc.c: Include alloca-conf.h rather than alloca.h.
* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.

15 years agoinclude/
Alan Modra [Wed, 18 Mar 2009 11:27:18 +0000 (11:27 +0000)]
include/
* alloca-conf.h: Revise based on autoconf-2.61, autoconf-2.13
documentation.
bfd/
* elf32-m68hc1x.c: Include alloca-conf.h.
* xsym.c: Likewise.
* elf64-hppa.c: Likewise.  Remove existing #if's handling alloca.
* som.c: Likewise.
* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
binutils/
* sysdep.h: Include alloca-conf.h instead of config.h and remove
existing #if's handling alloca.
* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
gas/
* as.h: Include alloca-conf.h instead of config.h and remove
existing #if's handling alloca.
* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
opcodes/
* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
* openrisc-opc.c: Regenerate.
ld/
* ld.h: Remove alloca handling.

15 years ago * archive.cc (Archive::add_symbols): Check for a version attached
Ian Lance Taylor [Wed, 18 Mar 2009 05:09:52 +0000 (05:09 +0000)]
* archive.cc (Archive::add_symbols): Check for a version attached
to the symbol name in the archive map.
* testsuite/Makefile.am (check_PROGRAMS): Add ver_test_11.
(ver_test_11_SOURCES, ver_test_11_DEPENDENCIES): Define.
(ver_test_11_LDFLAGS, ver_test_11_LDADD): Define.
(ver_test_11.a): New target.
* testsuite/Makefile.in: Rebuild.

15 years agomerge from gcc
DJ Delorie [Wed, 18 Mar 2009 00:07:49 +0000 (00:07 +0000)]
merge from gcc

15 years agodaily update
Alan Modra [Wed, 18 Mar 2009 00:00:05 +0000 (00:00 +0000)]
daily update

15 years ago * configure.ac: Check for chsize and posix_fallocate. Replace
Ian Lance Taylor [Tue, 17 Mar 2009 22:25:30 +0000 (22:25 +0000)]
* configure.ac: Check for chsize and posix_fallocate.  Replace
ftruncate.
* ftruncate.c: New file, from gnulib.
* output.cc (posix_fallocate): Define dummy version if not
HAVE_POSIX_FALLOCATE.
(Output_file::map): Call posix_fallocate rather than lseek and
write.
* gold.h (ftruncate): Declare if not HAVE_FTRUNCATE.
* configure, Makefile.in, config.in: Rebuild.

15 years ago2009-03-17 Paul Pluzhnikov <ppluzhnikov@google.com>
Paul Pluzhnikov [Tue, 17 Mar 2009 20:36:30 +0000 (20:36 +0000)]
2009-03-17  Paul Pluzhnikov  <ppluzhnikov@google.com>

* layout.h (Layout::create_note): Add section_name parameter.
* layout.cc (Layout::create_note): Likewise.
(Layout::create_build_id, Layout::create_gold_note): Fix callers.

15 years ago * descriptors.cc: Include "options.h".
Ian Lance Taylor [Tue, 17 Mar 2009 17:09:44 +0000 (17:09 +0000)]
* descriptors.cc: Include "options.h".
(FD_CLOEXEC, O_CLOEXEC): Define if not defined.
(Descriptors::open): Always use O_CLOEXEC when opening a new
descriptor.  If we have a plugin, and O_CLOEXEC was not defined,
then set FD_CLOEXEC.

15 years ago * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.
Daniel Jacobowitz [Tue, 17 Mar 2009 14:50:48 +0000 (14:50 +0000)]
* elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.

15 years agobfd/
Alan Modra [Tue, 17 Mar 2009 12:46:19 +0000 (12:46 +0000)]
bfd/
* elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
Add compact_stub.
(emum _ovly_flavour): Delete ovly_compact, ovly_none.
* elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
ovly_return fields with ovly_entry[2].  Adjust all users.
(spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
when soft-icache.
(spu_elf_build_stubs): Likewise.
(ovl_stub_size): Change arg to spu_elf_params pointer.  Adjust for
ovly_flavour changes.  Update all callers.
(ovl_stub_size_log2): New function.
(build_stub): Handle compact icache stubs.  Use different manager
entry point for stubs in non-icache area.
(spu_elf_size_stubs): Don't allocate space for indirect branch
descriptors.
(spu_elf_build_stubs): And don't built them.
ld/
* emultempl/spu_icache.S: Add new entry to dummy handler.
* emultempl/spu_icache.o_c: Regenerate.
* emultempl/spuelf.em (params): Init new field.
(no_overlays): New static var.
(spu_before_allocation): Use it.
(OPTION_SPU_COMPACT_STUBS): Define.
(PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add compact-stubs.
(PARSE_AND_LIST_ARGS_CASES): Handle compact-stubs.  Adjust no-overlays
handling.
ld/testsuite/
* ld-spu/icache1.d: Update for fixed set_id, new manager entry, and
reduced data.

15 years ago * sparc.cc (class Target_sparc): Add has_got_section.
Ian Lance Taylor [Tue, 17 Mar 2009 07:19:10 +0000 (07:19 +0000)]
* sparc.cc (class Target_sparc): Add has_got_section.
(Target_sparc::Scan::global): If we see _GLOBAL_OFFSET_TABLE_,
make sure we have a GOT section.

* sparc.cc (optimize_tls_reloc): Recognize R_SPARC_TLS_IE_ADD.
(Target_sparc::Scan::local): Likewise.
(Target_sparc::Scan::global): Likewise.
(Target_sparc::Relocate::relocate): Likewise.
(Target_sparc::Relocate::relocate_tls): Likewise.

15 years ago * symtab.cc (Symbol_table::define_default_version): New function,
Ian Lance Taylor [Tue, 17 Mar 2009 07:07:21 +0000 (07:07 +0000)]
* symtab.cc (Symbol_table::define_default_version): New function,
broken out of add_from_object.
(Symbol_table::add_from_object): Call define_default_version.
(Symbol_table::define_special_symbol): Add resolve_oldsym
parameter.  Change all callers.  If the version for a symbol comes
from a version script, resolve it with the symbol with the same
name with no version.  Also add the symbol without a version if
appropriate.
(do_define_in_output_data): If resolving with oldsym, don't delete
sym.
(do_define_in_output_segment): Likewise.
(do_define_as_constant): Likewise.
* symtab.h (class Symbol_table): Update declarations.

15 years agold/
Alan Modra [Tue, 17 Mar 2009 05:33:00 +0000 (05:33 +0000)]
ld/
* configure.host (HOSTING_LIBS): Two dollars on shell variable
expansion to suit make.
ld/testsuite
* config/default.exp (get_link_files): Replace double dollars with
single dollars.

15 years agold/
Alan Modra [Tue, 17 Mar 2009 05:01:26 +0000 (05:01 +0000)]
ld/
* configure.in: Invoke ACX_PROG_CMP_IGNORE_INITIAL.
* Makefile.am (check-DEJAGNU): Set DO_COMPARE.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* Makefile.in: Regenerate.
ld/testsuite/
* ld-bootstrap/bootstrap.exp: Use DO_COMPARE.  Remove unnecessary
cleanup and log output.

15 years agodaily update
Alan Modra [Tue, 17 Mar 2009 00:00:08 +0000 (00:00 +0000)]
daily update

15 years ago * ld-bootstrap/bootstrap.exp: Also pass '-liconv' to linker when
Dave Korn [Mon, 16 Mar 2009 22:03:44 +0000 (22:03 +0000)]
* ld-bootstrap/bootstrap.exp:  Also pass '-liconv' to linker when
linking statically on Cygwin, necessitated by '-lintl'.

15 years ago * configure.ac: Treat gdb as supported on x86_64-darwin.
Joel Brobecker [Mon, 16 Mar 2009 17:00:47 +0000 (17:00 +0000)]
    * configure.ac: Treat gdb as supported on x86_64-darwin.
        * configure: Regenerate.

15 years ago Merge from GCC:
Joseph Myers [Mon, 16 Mar 2009 13:29:49 +0000 (13:29 +0000)]
Merge from GCC:

2009-03-16  Joseph Myers  <joseph@codesourcery.com>

* configure.ac (--with-host-libstdcxx): New option.
* configure: Regenerate.

2009-01-29  Robert Millan  <rmh@aybabtu.com>

* configure.ac: Recognize GNU/kOpenSolaris (*-*-kopensolaris*-gnu).
* configure: Regenerate.

2009-01-12  Sebastian Pop <sebastian.pop@amd.com>

PR tree-optimization/38515
* configure.ac (cloog-polylib): Removed.
(with_ppl, with_cloog): Test for "no".
* configure: Regenerated.

15 years agoMove changelog entry to the right file.
Andrew Stubbs [Mon, 16 Mar 2009 12:50:42 +0000 (12:50 +0000)]
Move changelog entry to the right file.

Sorry folks.

15 years ago2009-03-16 Andrew Stubbs <ams@codesourcery.com>
Andrew Stubbs [Mon, 16 Mar 2009 12:41:26 +0000 (12:41 +0000)]
2009-03-16  Andrew Stubbs  <ams@codesourcery.com>

* dwarf2.c (read_section): Always use rawsize, if available.

15 years agoinclude/elf/
Jan Kratochvil [Mon, 16 Mar 2009 09:45:33 +0000 (09:45 +0000)]
include/elf/
* common.h (AT_RANDOM): Define.

15 years ago * simple.c (bfd_simple_get_relocated_section_contents): Use larger
Alan Modra [Mon, 16 Mar 2009 00:52:37 +0000 (00:52 +0000)]
* simple.c (bfd_simple_get_relocated_section_contents): Use larger
of rawsize and size for buffer.

15 years agodaily update
Alan Modra [Mon, 16 Mar 2009 00:00:05 +0000 (00:00 +0000)]
daily update

15 years ago * elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
Ulrich Weigand [Sun, 15 Mar 2009 15:15:29 +0000 (15:15 +0000)]
* elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
parameter just because fixed sections fit into local store.
(spu_elf_auto_overlay): Do not declare as "noreturn".  Skip
generating overlays if fixed sections plus reserved stack
and heap space fit into local store.

15 years ago * ld-auto-import/auto-import.exp: Add missing dll entrypoint.
Dave Korn [Sun, 15 Mar 2009 14:17:28 +0000 (14:17 +0000)]
* ld-auto-import/auto-import.exp:  Add missing dll entrypoint.

15 years ago * elf32-spu.c (build_stub): Correct icache set_id.
Alan Modra [Sun, 15 Mar 2009 03:28:51 +0000 (03:28 +0000)]
* elf32-spu.c (build_stub): Correct icache set_id.
(spu_elf_relocate_section): Likewise.

15 years agodaily update
Alan Modra [Sun, 15 Mar 2009 00:00:04 +0000 (00:00 +0000)]
daily update

15 years agogas/testsuite/
Richard Sandiford [Sat, 14 Mar 2009 09:37:18 +0000 (09:37 +0000)]
gas/testsuite/
* gas/ppc/textalign-xcoff-001.d: Expect the section VMAs to be
properly aligned.
* gas/ppc/textalign-xcoff-002.d: Likewise.

15 years agobfd/
Richard Sandiford [Sat, 14 Mar 2009 09:36:38 +0000 (09:36 +0000)]
bfd/
* xcofflink.c (xcoff_link_check_archive_element): Only free the
symbol table if it was created by the current call.

15 years agobfd/
Richard Sandiford [Sat, 14 Mar 2009 09:36:11 +0000 (09:36 +0000)]
bfd/
* xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
class XMC_DS rather than XMC_UA.

15 years agoinclude/coff/
Richard Sandiford [Sat, 14 Mar 2009 09:35:46 +0000 (09:35 +0000)]
include/coff/
* xcoff.h (XCOFF_EXPALL, XCOFF_EXPFULL): New flags.
(xcoff_loader_info): Add auto_export_flags.

bfd/
* bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
bfd_boolean export_defineds parameter with an unsigned int
auto_export_flags parameter.
* bfd-in2.h: Regenerate.
* xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
split out from xcoff_build_ldsyms.
(xcoff_covered_by_expall_p): New function.
(xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
but with extra code to handle -bexpfull and -bexpall.
(xcoff_mark_auto_exports): New function.
(xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
a function should be automatically exported.
(bfd_xcoff_size_dynamic_sections): Replace the export_defineds
parameter with an auto_export_flags parameter.  Update ldinfo
accordingly.  Use xcoff_mark_auto_exports to mark all automatically-
exported symbols.

ld/
* emultempl/aix.em (auto_export_flags): New variable.
(explicit_auto_export_flags): Likewise.
(OPTION_EXPALL, OPTION_EXPFULL): New enum values.
(OPTION_NOEXPALL, OPTION_NOEXPFULL): Likewise.
(gld${EMULATION_NAME}_add_options): Add -bexpall, -bexpfull,
-bnoexpall and -bnoexpfull.
(gld${EMULATION_NAME}_handle_option): Handle them.
(gld${EMULATION_NAME}_before_allocation): Update the call to
bfd_size_dynamic_sections.

ld/testsuite/
* ld-powerpc/aix-export-1-all.dd, ld-powerpc/aix-export-1-full.dd,
ld-powerpc/aix-export-1a.s, ld-powerpc/aix-export-1b.s: New tests.
* ld-powerpc/aix52.exp: Run them.

15 years agobfd/
Richard Sandiford [Sat, 14 Mar 2009 09:35:06 +0000 (09:35 +0000)]
bfd/
* xcofflink.c (xcoff_mark_symbol_by_name): New function.
(bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
init and fini functions.  Do garbage collection for objects
without an entry point too.

ld/testsuite/
* ld-powerpc/aix-gc-1.s, ld-powerpc/aix-gc-1.ex,
ld-powerpc/aix-gc-1-32.dd, ld-powerpc/aix-gc-1-64.dd,
ld-powerpc/aix-weak-1-gcdso.dnd, ld-powerpc/aix-weak-1-gcdso.hd,
ld-powerpc/aix-weak-1-gcdso.nd: New tests.
* ld-powerpc/aix52.exp: Run them.

15 years agoinclude/coff/
Richard Sandiford [Sat, 14 Mar 2009 09:34:27 +0000 (09:34 +0000)]
include/coff/
* internal.h (C_AIX_WEAKEXT): New macro.
(C_WEAKEXT): Use the GNU definition in the generic part of the file,
and conditionally reset it to C_AIX_WEAKEXT in the XCOFF part of
the file.
(CSECT_SYM_P): New macro.
* xcoff.h (L_WEAK): Define.
(EXTERN_SYM_P): New macro.

bfd/
* coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
check whether a symbol has csect information.
(coff_print_aux): Likewise.
* coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
information for C_AIX_WEAKEXT too.
(_bfd_xcoff_swap_aux_out): Likewise.
(xcoff_reloc_type_br): Handle defweak symbols too.
* coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
information for C_AIX_WEAKEXT too.
(_bfd_xcoff64_swap_aux_out): Likewise.
(xcoff64_reloc_type_br): Handle defweak symbols too.
* coffgen.c (coff_print_symbol): Handle auxillary function
information for C_AIX_WEAKEXT too.
* xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
instead of BSF_GLOBAL if the L_WEAK flag is set.
(xcoff_dynamic_definition_p): New function.
(xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
defines h.  Don't change h if ldsym isn't the definition.  Otherwise,
always take the symbol class from the ldsym.  Use weak bfd symbol
types for weak ldsyms.
(xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
Fix the check for whether a definition is from a shared object.
Allow redefinitions of weak symbols.
(xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
(xcoff_keep_symbol_p): Likewise.
(bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
(xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
but mark them as L_WEAK.
(xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.

gas/
* config/tc-ppc.c (ppc_frob_symbol): Add csect information for
C_AIX_WEAKEXT too.

ld/testsuite/
* ld-powerpc/aix-glink-2a.s, ld-powerpc/aix-glink-2a.ex,
ld-powerpc/aix-glink-2b.s, ld-powerpc/aix-glink-2c.s,
ld-powerpc/aix-glink-2c.ex, ld-powerpc/aix-glink-2d.s,
ld-powerpc/aix-glink-2-32.dd, ld-powerpc/aix-glink-2-64.dd,
ld-powerpc/aix-weak-1a.s, ld-powerpc/aix-weak-1b.s,
ld-powerpc/aix-weak-1-rel.hd, ld-powerpc/aix-weak-1-rel.nd,
ld-powerpc/aix-weak-1-dso.hd, ld-powerpc/aix-weak-1-dso.nd,
ld-powerpc/aix-weak-1-dso.dnd, ld-powerpc/aix-weak-1.ex,
ld-powerpc/aix-weak-2a.s, ld-powerpc/aix-weak-2a.ex,
ld-powerpc/aix-weak-2a.nd, ld-powerpc/aix-weak-2b.s,
ld-powerpc/aix-weak-2b.nd, ld-powerpc/aix-weak-2c.s,
ld-powerpc/aix-weak-2c.ex, ld-powerpc/aix-weak-2c.nd,
ld-powerpc/aix-weak-2c.od, ld-powerpc/aix-weak-3a.s,
ld-powerpc/aix-weak-3a.ex, ld-powerpc/aix-weak-3b.s,
ld-powerpc/aix-weak-3b.ex, ld-powerpc/aix-weak-3-32.d,
ld-powerpc/aix-weak-3-32.dd, ld-powerpc/aix-weak-3-64.d,
ld-powerpc/aix-weak-3-64.dd: New tests.
* ld-powerpc/aix52.exp: Run them.  Replace tmp/aix-* with
tmp/aix64-* in 64-bit ld options.

15 years agoinclude/coff/
Richard Sandiford [Sat, 14 Mar 2009 09:33:39 +0000 (09:33 +0000)]
include/coff/
* xcoff.h (XCOFF_ALLOCATED): New flag.

bfd/
* xcofflink.c (xcoff_mark): When walking the relocations,
only mark the target symbol or the target section, not both.
(xcoff_final_definition_p): New function.
(xcoff_keep_symbol_p): Use it to check whether an external XCOFF
symbol is a valid definition of the associated output symbol.
Use XCOFF_ALLOCATED to stop the same hash table entry having
two output symbols.
(bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
keeping a symbol.
(xcoff_link_input_bfd): Use xcoff_final_definition_p.

ld/testsuite/
* ld-powerpc/aix-no-dup-syms-1a.s, ld-powerpc/aix-no-dup-syms-1b.s,
ld-powerpc/aix-no-dup-syms-1.ex, ld-powerpc/aix-no-dup-syms-1.im,
ld-powerpc/aix-no-dup-syms-1-dso.dnd,
ld-powerpc/aix-no-dup-syms-1-dso.drd,
ld-powerpc/aix-no-dup-syms-1-dso.nd,
ld-powerpc/aix-no-dup-syms-1-dso.rd,
ld-powerpc/aix-no-dup-syms-1-rel.nd,
ld-powerpc/aix-no-dup-syms-1-rel.rd: New tests.
* ld-powerpc/aix52.exp: Run them.

15 years agobfd/
Richard Sandiford [Sat, 14 Mar 2009 09:32:56 +0000 (09:32 +0000)]
bfd/
* xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
symbols as XMC_XO.

ld/testsuite/
* ld-powerpc/aix-abs-branch-1.nd,
ld-powerpc/aix-abs-reloc-1.nd: New tests.
* ld-powerpc/aix52.exp: Run them.

15 years agobfd/
Richard Sandiford [Sat, 14 Mar 2009 09:32:33 +0000 (09:32 +0000)]
bfd/
* libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
* libcoff.h: Regenerate.
* xcofflink.c (xcoff_link_add_symbols): Record per-symbol
line-number counts in the bfd's lineno_counts field.
Don't keep per-csect line-number counts.
(xcoff_sweep): Don't update per-csect line-number counts.
(bfd_xcoff_size_dynamic_sections): Count the number of line-number
entries in each output section.
(xcoff_link_input_bfd): Get the number of line numbers from
the bfd's lineno_counts field, rather than recalculating it
from scratch.  Fix the range check when updating C_BINCL and
C_EINCL symbols.
(_bfd_xcoff_bfd_final_link): Don't count the output line numbers
here.  Don't expect csects to have line-number counts.

ld/testsuite/
* ld-powerpc/aix-lineno-1.s, ld-powerpc/aix-lineno-1.txt,
ld-powerpc/aix-lineno-1a.dd, ld-powerpc/aix-lineno-1a.nd,
ld-powerpc/aix-lineno-1b.dd, ld-powerpc/aix-lineno-1b.nd: New tests.
* ld-powerpc/aix52.exp: Run them.  Copy aix-lineno-1.txt to tmpdir.

15 years agobfd/
Richard Sandiford [Sat, 14 Mar 2009 09:32:06 +0000 (09:32 +0000)]
bfd/
* libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
* libcoff.h: Regenerate.
* xcofflink.c (xcoff_keep_symbol_p): New function, using the
"skip" logic from xcoff_link_input_bfd.
(bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
objects in a dynamic link, rather than checking whether csectpp
is null.  Always allocate debug_index for other objects,
and always go through the loop.  Update the type of debug_index
after the change above.  Read the auxillary csect information
and use xcoff_keep_symbol_p to decide whether a symbol should
be kept.  Set its debug_index to -2 if not.
(xcoff_link_input_bfd): Update the type of debug_index after
the change above and always expect it to be nonnull.  Use it to
test whether a symbol should be stripped, rather than making the
decision here.  Postpone all symbol creation to the second pass.

15 years agobfd/
Richard Sandiford [Sat, 14 Mar 2009 09:18:22 +0000 (09:18 +0000)]
bfd/
* xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
creating a descriptor.
(xcoff_sweep): Don't mark toc_section unless it's needed.
(bfd_xcoff_size_dynamic_sections): Skip the toc_section
when marking every bfd.
(xcoff_link_input_bfd): Skip all TOC anchors.
(xcoff_toc_section_p, xcoff_find_tc0): New functions.
(_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
to -1; call xcoff_find_tc0 instead.

ld/testsuite/
* ld-powerpc/aix-toc-1.ex, ld-powerpc/aix-toc-1a.s,
ld-powerpc/aix-toc-1b.s, ld-powerpc/aix-toc-1-32.dd,
ld-powerpc/aix-toc-1-64.dd: New tests.
* ld-powerpc/aix52.exp: Run them.

15 years agobfd/
Richard Sandiford [Sat, 14 Mar 2009 09:17:56 +0000 (09:17 +0000)]
bfd/
* libcoff-in.h (xcoff_section_tdata): Update commentary.
* libcoff.h: Regenerate.
* xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
the previous symbol's csect.  Treat last_symndx as an inclusive value
and simplify its handling.
(xcoff_mark): Treat last_symndx as an inclusive value.  Only mark
symbols with the right csect.  Don't mark rsec when processing
relocations against undefined or absolute sections.
(bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
of bfd_und_section_ptr.
(xcoff_link_input_bfd): Likewise.

15 years agoinclude/coff/
Richard Sandiford [Sat, 14 Mar 2009 09:17:32 +0000 (09:17 +0000)]
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.

15 years agogas/
Richard Sandiford [Sat, 14 Mar 2009 09:16:31 +0000 (09:16 +0000)]
gas/
* config/tc-ppc.c (md_apply_fix): On COFF targets, always reread
"value" from fx_offset.  Manually resubtract md_pcrel_from_section
where necessary.

gas/testsuite/
* gas/ppc/xcoff-branch-1.s, gas/ppc/xcoff-branch-1-32.d,
gas/ppc/xcoff-branch-1-64.d: New tests.
* gas/ppc/aix.exp: Run them.