Commit Graph

3599 Commits

Author SHA1 Message Date
Richard Sandiford cbc704f397 bfd/
* elf32-arm.c (elf32_arm_check_relocs): Always assign a dynobj.
	(elf32_arm_finish_dynamic_sections): Move sgot != NULL assertion
	into the PLT block.

ld/
	* emultempl/armelf.em (arm_elf_before_allocation): Check dynobj
	instead of dynamic_sections_created.
2011-03-14 15:53:58 +00:00
Richard Sandiford f6e32f6db5 bfd/
* elf32-arm.c (elf32_arm_check_relocs): Use call_reloc_p,
	may_need_local_target_p and may_become_dynamic_p to classify
	the relocation type.  Don't check info->symbolic or h->def_regular
	when deciding whether to record a potential dynamic reloc.
	Don't treat potential dynamic relocs as PLT references.
	(elf32_arm_gc_sweep_hook): Update to match.  Assert that we don't
	try to make the PLT reference count go negative.

ld/testsuite/
	* ld-arm/arm-lib-plt-2a.s, ld-arm/arm-lib-plt-2b.s,
	ld-arm/arm-lib-plt-2.dd, ld-arm/arm-lib-plt-2.rd: New tests.
	* ld-arm/arm-elf.exp: Run them.
2011-03-14 15:53:33 +00:00
Richard Sandiford b436d85411 bfd/
* elf32-arm.c (elf32_arm_final_link_relocate): Always fill in the
	GOT entry here, rather than leaving it to finish_dynamic_symbol.
	Only create a dynamic relocation for local references if
	info->shared.
	(allocate_dynrelocs_for_symbol): Update dynamic relocation
	allocation accordingly.
	(elf32_arm_finish_dynamic_symbol): Don't initialise the GOT entry here.

ld/testsuite/
	* ld-arm/exec-got-1a.s, ld-arm/exec-got-1b.s, ld-arm/exec-got-1.d,
	ld-arm/unresolved-1.s, ld-arm/unresolved-1.d,
	ld-arm/unresolved-1-dyn.d: New tests.
	* ld-arm/arm-elf.exp: Run them.
2011-03-14 15:52:53 +00:00
H.J. Lu 52bc799a91 Support TLS x32 GD->IE, GD->LE and LD->LE transitions.
bfd/

2011-03-12  H.J. Lu  <hongjiu.lu@intel.com>

	* elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
	x32 GD->IE and GD->LE transitions.
	(elf_x86_64_relocate_section): Supprt TLS x32 GD->IE, GD->LE
	and LD->LE transitions.

ld/testsuite/

2011-03-12  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-x86-64/tlsgd4.dd: New.
	* ld-x86-64/tlsgd4.s: Likewise.
	* ld-x86-64/tlsgd5.dd: Likewise.
	* ld-x86-64/tlsgd5a.s: Likewise.
	* ld-x86-64/tlsgd5b.s: Likewise.
	* ld-x86-64/tlsgd6.dd: Likewise.
	* ld-x86-64/tlsgd6a.s: Likewise.
	* ld-x86-64/tlsgd6b.s: Likewise.
	* ld-x86-64/tlsld2.dd: Likewise.
	* ld-x86-64/tlsld2.s: Likewise.

	* ld-x86-64/x86-64.exp (x86_64tests): Add tlsgd4, libtlsgd5.so,
	tlsgd5, libtlsgd6.so, tlsgd6 and tlsld2.
2011-03-12 14:38:31 +00:00
Dave Korn 10be1b6abe [PATCH] Respect symbol wrappers when computing symbol resolutions.
ld/ChangeLog:

2011-03-10  Dave Korn  <dave.korn.cygwin@gmail.com>

	* plugin.c (get_symbols): Use wrapped lookup for undefined symbols.
2011-03-10 10:27:50 +00:00
Dave Korn 422b6f1440 [PATCH] Fix issue from GCC PR47527: no ELF flags, EABI attribs, etc. in dummy IR BFD.
ld/ChangeLog:

2011-03-10  Dave Korn  <dave.korn.cygwin@gmail.com>

	* ldlang.c (lang_check): Don't run checks on dummy IR BFDs.
2011-03-10 10:26:26 +00:00
Dave Korn 8543fde54a [PATCH] Revise linker plugin API to better preserve link order.
ld/ChangeLog:

2011-03-10  Dave Korn  <dave.korn.cygwin@gmail.com>

	* ldlang.h (lang_input_statement_type): Add new 'claim_archive' flag,
	wrapping both it and 'claim' flag in #ifdef ENABLE_PLUGINS.
	* ldmain.c (add_archive_element): Set it if the member is claimed.
	* ldlang.c (new_afile): Initialise claim_archive and claimed members.
	(find_replacements_insert_point): New helper function.
	(lang_process): After adding and opening replacement files passed
	from plugin, splice them into correct place in statement list and
	file chains to preserve critical link order.
	(lang_list_insert_after): New helper function.
	(lang_list_remove_tail): Likewise.
2011-03-10 10:25:02 +00:00
Dave Korn cf4dc96f0f [PATCH] Do not use dummy bfd suffix for recognition, make it human-readable instead.
ld/ChangeLog:

2011-03-10  Dave Korn  <dave.korn.cygwin@gmail.com>

	* plugin.c (IRONLY_SUFFIX): Revise to nicely human-readable form.
	(IRONLY_SUFFIX_LEN): Delete.
	(plugin_get_ir_dummy_bfd): Don't append IRONLY_SUFFIX.
	(is_ir_dummy_bfd): Don't look for suffix; check claimed flag of
	enclosing lang input statement instead.
2011-03-10 10:22:24 +00:00
Dave Korn 4bf0cafb35 [PATCH] Fix PE-COFF bug in orphan section alignment handling.
ld/ChangeLog:

2011-03-10  Dave Korn  <dave.korn.cygwin@gmail.com>

	* emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Preserve
	alignment of input sections when creating orphan output sections
	during relocatable link.
	* emultempl/pep.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
2011-03-10 10:20:26 +00:00
H.J. Lu 1715a13cc2 Report plugin symbols for --verbose=N.
2011-03-04  H.J. Lu  <hongjiu.lu@intel.com>

	* ld.texinfo: Document --verbose[=NUMBER].

	* lexsup.c (ld_options): Update --verbose.
	(parse_args): Set report_plugin_symbols.

	* plugin.c (report_plugin_symbols): New.
	(get_symbols): Report plugin symbols if report_plugin_symbols
	is TRUE.

	* plugin.h (report_plugin_symbols): New.
2011-03-04 23:44:01 +00:00
H.J. Lu 4a4c5f250b Supprt TLS x32 IE->LE transition.
bfd/

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

	* elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
	x32 IE->LE transition.
	(elf_x86_64_relocate_section): Likewise.

ld/testsuite/

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

	* ld-x86-64/tlsie4.dd: New.
	* ld-x86-64/tlsie4.s: Likewise.

	* ld-x86-64/x86-64.exp (x86_64tests): Add tlsie4.
2011-03-03 22:11:33 +00:00
H.J. Lu f4c37f5655 Don't use filename_cmp in plugin test DSO.
2011-03-01  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/12529
	* testplug.c: Don't include "filenames.h".
	(onclaim_file): Don't use filename_cmp.
2011-03-01 22:55:35 +00:00
Kai Tietz 426278217b 2011-02-28 Kai Tietz <kai.tietz@onevision.com>
* emultempl/beos.em (sort_by_file_name): Use filename_(n)cmp.
	* emultempl/elf32.em (gld${EMULATION_NAME}_vercheck):
	Likewise.
	(gld${EMULATION_NAME}_stat_needed): Likewise.
	(gld${EMULATION_NAME}_check_needed): Likewise.
	* emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Likewise.
	(gld_${EMULATION_NAME}_unrecognized_file): Likewise.
	* emultempl/pep.em (gld_${EMULATION_NAME}_after_open): Likewise.
	(gld_${EMULATION_NAME}_unrecognized_file): Likewise.
	* ldfile.c (ldfile_open_file): Likewise.
	* ldlang.c (wild_sort): Likewise.
	(lookup_name): Likewise.
	(check_excluded_libs): Likewise.
	* ldmisc.c (vfinfo): Likewise.
	* pe-dll.c (libnamencmp): Likewise.
	(auto_export): Likewise.
	(pe_dll_generate_implib): Likewise.
	* testplug.c (onclaim_file): Likewise.
2011-02-28 18:34:52 +00:00
H.J. Lu 174b85fcf1 Add entry_symbol chain into non_ironly_hash.
2011-02-24  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/12507
	* plugin.c (get_symbols): Don't check entry symbol here.
	(init_non_ironly_hash): Add entry_symbol chain into
	non_ironly_hash.
2011-02-26 04:38:34 +00:00
H.J. Lu 6ee6cf6ac1 Add a testcase for PR ld/12516.
2011-02-25  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/12516
	* ld-elf/dynamic1.d: New.
	* ld-elf/dynamic1.ld: Likewise.
	* ld-elf/dynamic1.s: Likewise.
2011-02-25 15:53:24 +00:00
Alan Modra e1e9003466 PR gas/12519
* config/obj-elf.c (elf_frob_symbol): Properly handle size expression.
	* ld-mn10300/i135409-3.s: Correct .size label reference.
	* ld-sh/sh64/stolib.s: Likewise.
2011-02-25 13:45:54 +00:00
H.J. Lu 8ff09c128e Don't mark entry symbol IR only.
2011-02-24  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/12507
	* plugin.c (get_symbols): Don't mark entry symbol IR only.
2011-02-24 22:58:05 +00:00
H.J. Lu 3b8d4c366a Don't include <exception_defines.h>
2011-02-23  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-elf/new.cc: Don't include <exception_defines.h>.
2011-02-23 22:37:48 +00:00
Dave Anglin ae97b9228d PR ld/12376
emulparams/hppalinux.sh (DATA_ADDR): Define.
	(SHLIB_DATA_ADDR): Likewise.
2011-02-18 18:20:29 +00:00
H.J. Lu 73f2a3d2e9 Change x32 LIBPATH_SUFFIX to x32.
2011-02-16  H.J. Lu  <hongjiu.lu@intel.com>

	* emulparams/elf32_x86_64.sh (LIBPATH_SUFFIX): Changed to
	x32 for x32.
2011-02-16 19:14:41 +00:00
Kai Tietz fd11958c53 2011-02-15 Kai Tietz <kai.tietz@onevision.com>
* pe-dll.c (process_def_file_and_drectve): Don't strip
        leading underscore from symbol by calling bfd_find_version_for_sym.
2011-02-15 16:15:55 +00:00
Mike Frysinger 93252b1cf4 bfd/ld: handle ABI prefixes in version scripts
The default language in version scripts is supposed to be C, but no
symbol demangling is performed on the symbols by default.  This makes
targets with a symbol prefix to fail with most version scripts out
there.  So strip away this prefix by default.

This fixes many tests (real world and ld's testsuite) for Blackfin
targets and doesn't seem to cause regressions for x86_64.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-14 17:03:45 +00:00
Alan Modra 498cd2a0fd * ldmain.c (remove_output): Rename to..
(ld_cleanup): ..this. Call bfd_cache_close_all and plugin_call_cleanup.
	(main): Adjust.
	* plugin.c (plugin_call_cleanup): Make global.
	(plugin_load_plugins): Don't register plugin_call_cleanup with xatexit.
	* plugin.h (plugin_call_cleanup): Declare.
2011-02-14 09:53:15 +00:00
Ralf Wildenhues 822ce8ee21 Remove freebsd1 from libtool.m4 macros and config.rpath.
/:
	Import from Libtool and gnulib:

	2011-01-27  Gerald Pfeifer  <gerald@pfeifer.com>

	Prepare for supporting FreeBSD 10.
	* config.rpath: Remove handling of freebsd1* which soon would
	match FreeBSD 10.0.

	2011-01-20  Gerald Pfeifer  <gerald@pfeifer.com>  (tiny change)

	Remove support for FreeBSD 1.x.
	* libtool.m4 (_LT_LINKER_SHLIBS)
	(_LT_SYS_DYNAMIC_LINKER): Remove handling of freebsd1* which
	soon would incorrectly match FreeBSD 10.0.

bfd/:
	* configure: Regenerate.

gas/:
	* configure: Regenerate.

ld/:
	* configure: Regenerate.

opcodes/:
	* configure: Regenerate.

binutils/:
	* configure: Regenerate.

gprof/:
	* configure: Regenerate.
2011-02-13 21:00:14 +00:00
Alan Modra dc56ba2d58 remove accidental SANE_EXPR change 2011-02-10 08:35:26 +00:00
Alan Modra 09b910c68c * scripttempl/armbpabi.sc: Revert 2010-11-02 H.J. Lu.
* scripttempl/avr.sc: Likewise.
	* scripttempl/elf32cr16.sc: Likewise.
	* scripttempl/elf32crx.sc: Likewise.
	* scripttempl/elf32msp430.sc: Likewise.
	* scripttempl/elf32msp430_3.sc: Likewise.
	* scripttempl/elf32sh-symbian.sc: Likewise.
	* scripttempl/elf64hppa.sc: Likewise.
	* scripttempl/elf_chaos.sc: Likewise.
	* scripttempl/elfd10v.sc: Likewise.
	* scripttempl/elfd30v.sc: Likewise.
	* scripttempl/elfi370.sc: Likewise.
	* scripttempl/elfm68hc11.sc: Likewise.
	* scripttempl/elfm68hc12.sc: Likewise.
	* scripttempl/elfxtensa.sc: Likewise.
	* scripttempl/ip2k.sc: Likewise.
	* scripttempl/iq2000.sc: Likewise.
	* scripttempl/mep.sc: Likewise.
	* scripttempl/mmo.sc: Likewise.
	* scripttempl/v850.sc: Likewise.
	* scripttempl/xstormy16.sc: Likewise.
	* scripttempl/elf.sc: Revert 2010-10-29  H.J. Lu.
2011-02-10 08:18:58 +00:00
Alan Modra ea6c5ce90d * ld-scripts/defined.exp: Don't run defined5 for AOUT.
* ld-scripts/defined5.s: Use .text for "defined" section.
	* ld-scripts/defined5.t: Adjust.
2011-02-10 08:04:22 +00:00
Alan Modra 6092a2bf7b * ld-gc/start.d: Exclude frv-*-linux*.
* ld-misc/defsym1.d: Likewise.
2011-02-10 07:24:06 +00:00
Alan Modra 2893311c83 * ld-elfvsb/elfvsb.exp: Don't run any non-PIC tests on powerpc*-linux.
* ld-gc/gc.exp: Ensure powerpc64 test continues to fail.
	* ld-srec/srec.exp: Don't edit toc on powerpc64.
2011-02-09 08:18:54 +00:00
Alan Modra 6a2bb08055 * ld-scripts/sane1.d, * ld-scripts/sane1.t: New test.
* ld-scripts/expr.exp: Run it.
2011-01-23 03:29:30 +00:00
H.J. Lu 3cb622973f Add AC_PROG_CXX.
2011-01-22  H.J. Lu  <hongjiu.lu@intel.com>

	* Makefile.am (CXX): Removed.

	* configure.in: Add AC_PROG_CXX.

	* Makefile.in: Regenerated.
	* configure: Likewise.
2011-01-22 19:25:37 +00:00
Richard Sandiford ed88c97ee7 bfd/
* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Ignore
	common sections too.

ld/
	* plugin.c (plugin_get_ir_dummy_bfd): Copy across the bfd's
	private data and GP size.
2011-01-22 10:16:29 +00:00
Alan Modra 9bc8bb33fe * ldexp.c (fold_binary): Set result section for arithmetic and
logical operations to NULL when both operands are in same section.
	* ld.texinfo (Expression Section): Describe this.
2011-01-21 13:18:19 +00:00
H.J. Lu 1a0c107f58 Undo Solaris damages in elf64-x86-64.c.
bfd/

2011-01-18  H.J. Lu  <hongjiu.lu@intel.com>

	* elf64-x86-64.c (elf_backend_static_tls_alignment): Undefine
	after Solaris target.
	(elf_backend_want_plt_sym): Redefine to 0 after Solaris target.

ld/testsuite/

2011-01-18  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-x86-64/ilp32-4.d: Updated.
2011-01-18 20:41:09 +00:00
Richard Sandiford da17376b70 bfd/
* elf32-arm.c (elf32_arm_check_relocs): Check needs_plt rather than
	h->needs_plt when deciding whether to record a possible dynamic reloc.

ld/testsuite/
	* ld-arm/arm-rel32.s, ld-arm/arm-rel32.d: New testcase.
	* ld-arm/arm-elf.exp: Run it.
2011-01-17 16:36:43 +00:00
Richard Sandiford 1e81e12b2c bfd/
* elf32-arm.c (elf32_arm_gc_sweep_hook): Remove all registered
	dynamic relocs for the removed section.

ld/testsuite/
	* ld-arm/gc-thumb-lib.s, ld-arm/gc-thumb.s,
	ld-arm/gc-thumb.d: New test.
	* ld-arm/arm-elf.exp: Run it.
2011-01-17 16:36:15 +00:00
H.J. Lu 9d53781512 Replace n32 with x32. 2011-01-15 00:38:35 +00:00
H.J. Lu 570561f71a Rename --n32 to --x32.
gas/

2011-01-14  H.J. Lu  <hongjiu.lu@intel.com>

	* config/tc-i386.c (OPTION_N32): Renamed to ...
	(OPTION_X32): This.
	(md_longopts): Replace n32 with x32.
	(md_parse_option): Updated.
	(md_show_usage): Likewise.

	* doc/c-i386.texi: Replace n32 with x32.

gas/testsuite/

2011-01-14  H.J. Lu  <hongjiu.lu@intel.com>

	* gas/i386/ilp32/cfi/ilp32.exp: Replace --n32 with --x32.
	* gas/i386/ilp32/elf/ilp32.exp: Likewise.
	* gas/i386/ilp32/ilp32.exp: Likewise.
	* gas/i386/ilp32/lns/ilp32.exp: Likewise.

ld/testsuite/

2011-01-14  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-x86-64/ilp32-1.d: Replace --n32 with --x32.
	* ld-x86-64/ilp32-2.d: Likewise.
	* ld-x86-64/ilp32-3.d: Likewise.
	* ld-x86-64/ilp32-4.d: Likewise.
	* ld-x86-64/ilp32-5.d: Likewise.
	* ld-x86-64/x86-64.exp: Likewise.
2011-01-14 23:07:11 +00:00
H.J. Lu 248775ba37 Handle R_X86_64_32 like R_X86_64_64 for ILP32.
bfd/

2011-01-14  H.J. Lu  <hongjiu.lu@intel.com>

	* elf64-x86-64.c (elf_x86_64_link_hash_table): Add pointer_r_type.
	(elf_x86_64_link_hash_table_create): Set pointer_r_type.
	(elf_x86_64_check_relocs): Handle R_X86_64_32 like R_X86_64_64
	for ILP32.  Remove ABI_64_P PIC check for R_X86_64_8,
	R_X86_64_16, R_X86_64_32 and R_X86_64_32S.
	(elf_x86_64_relocate_section):  Handle R_X86_64_32 like R_X86_64_64
	for ILP32.

ld/testsuite/

2011-01-14  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-x86-64/ilp32-5.d: New.
	* ld-x86-64/ilp32-5.s: Likewise.

	* ld-x86-64/x86-64.exp: Run ilp32-5.
2011-01-14 22:48:12 +00:00
Alan Modra e922bcabdf * ldmain.c (main): Flush stdout before and stderr after printing
message.
	* ldmisc.c (einfo): Similarly.
	* plugin.c (message): Likewise.
	* emultempl/ppc64elf.em: Likewise.
	* emultempl/xtensaelf.em: Likewise.
	* emulparams/elf32mcore.sh: Use einfo rather than printf.
	* emultempl/beos.em: Likewise.
	* emultempl/pe.em: Likewise.
	* emultempl/pep.em: Likewise.
2011-01-14 12:37:17 +00:00
H.J. Lu 82e96e07e5 Fix x86-64 ILP32 shared library.
bfd/

2011-01-13  H.J. Lu  <hongjiu.lu@intel.com>

	* elf64-x86-64.c (elf_x86_64_link_hash_table): Remove
	swap_reloca_out.
	(elf_x86_64_link_hash_table_create): Don't set swap_reloca_out.
	(elf_x86_64_check_relocs): Align relocation section to 4 byte
	for 32bit.
	(elf_x86_64_gc_sweep_hook): Replace ELF64_ST_TYPE with
	ELF_ST_TYPE.
	(elf_x86_64_finish_dynamic_symbol): Updated.
	(elf_x86_64_finish_dynamic_sections): Don't use
	Elf64_External_Dyn, bfd_elf64_swap_dyn_in, nor
	bfd_elf64_swap_dyn_out.

ld/testsuite/

2011-01-13  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-x86-64/ilp32-4.d: New.

	* ld-x86-64/x86-64.exp: Run ilp32-4.
2011-01-14 04:24:00 +00:00
Alan Modra 175b7cd42c * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
attempt to put non-alloc orphans before debug sections, just place
	them after .comment.
2011-01-14 02:27:41 +00:00
Alan Modra a05e447ffb PR ld/12339
* ldlang.c (sort_def_symbol): Handle bfd_link_hash_warning symbols.
2011-01-14 02:18:22 +00:00
Alan Modra 3ed41d5946 * Makefile.am: Sort emulation rules.
(eelf32am33lin.c): Delete.
	(ALL_EMULATION_SOURCES): Sort, add missing entries.
	(ALL_64_EMULATION_SOURCES): Likewise.
	* Makefile.in: Regenerate.
2011-01-14 02:03:42 +00:00
H.J. Lu 75e68ef97a Add a testcase for PR ld/12356.
2011-01-13  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/12356
	* ld-scripts/defined.exp: Run defined5.

	* ld-scripts/defined5.d: New.
	* ld-scripts/defined5.s: Likewise.
	* ld-scripts/defined5.t: Likewise.
2011-01-13 17:07:52 +00:00
H.J. Lu e235872c41 Add xfail and notarget.
2011-01-13  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-scripts/defined4.d: Xfail rs6000-*-aix*.  Skip mips*-*-*
	and mmix-*-*.

	* ld-scripts/expr2.d: Xfail rs6000-*-aix* and arm-*-*aout.
2011-01-13 15:23:59 +00:00
Alan Modra 729c05fc7c Update copyright dates. 2011-01-13 13:34:54 +00:00
Alan Modra 01554a74b5 PR ld/12356
* ld.texinfo (Miscellaneous Commands): Describe LD_FEATURE.
	(Expression Section): Update.
	* ld.h (ld_config_type): Add sane_expr.
	* ldgram.y (ifile_p1): Add LD_FEATURE.
	* ldlex.l (LD_FEATYRE): New.
	* ldemul.c (after_parse_default): Delete code handling ld_compatibility.
	* ldexp.h (struct ldexp_control): Delete uses_defined.
	* ldexp.c: Remove all uses of uses_defined.
	(fold_name): Test config.sane_expr rather than ld_compatibility.
	(exp_fold_tree_1): Likewise.  Adjust handling of assignments
	during first phase.
	* ldlang.h (ld_compatibility): Delete.
	(lang_ld_feature): Declare.
	* ldlang.c (ld_compatibility): Delete.
	(open_input_bfds): Only handle assignments for --defsym.
	(lang_ld_feature): New function.
2011-01-13 13:29:55 +00:00
Alan Modra 2e57b2afce PR ld/12356
* ldexp.h (exp_assop): Delete.
	(exp_assign, exp_defsym): Declare.
	* ldexp.c (exp_assop): Make static, handle all assignment variations.
	(exp_assign, exp_defsym): New functions.
	(exp_provide): Use exp_assop.
	* ldgram.y (defsym_expr): Use exp_defsym.
	* ldctor.c, * ldgram.y, * ldlang.c, * mri.c, * emultempl/beos.em,
	* emultempl/pe.em, * emultempl/pep.em, * emultempl/spuelf.em,
	* emultempl/xtensaelf.em: Update exp_assop -> exp_assign.
2011-01-13 13:06:22 +00:00
Alan Modra ea7c2e6c9b PR ld/12380
* ldexp.h (enum phase_enum): Comment.  Add exp_dataseg_done.
	* ldexp.c (fold_unary <DATA_SEGMENT_END>): Rearrange code.  Test
	for exp_dataseg_done rather than expld.phase == lang_final_phase_enum
	to detect when we've finished sizing sections.
	(fold_binary <DATA_SEGMENT_ALIGN>): Likewise.
	(fold_binary <DATA_SEGMENT_RELRO_END>): Likewise.  Also test
	that we are not inside an output section statement.
	* ldlang.c (lang_size_sections): Set exp_dataseg_done on exit if
	not exp_dataseg_relro_adjust or exp_dataseg_adjust.  Don't set
	lang_final_phase_enum here.
	(lang_process): Set lang_final_phase_enum here.
2011-01-12 12:07:19 +00:00