Commit Graph

4294 Commits

Author SHA1 Message Date
Roland McGrath c2763e270c Fix references to __ehdr_start when it cannot be defined
ld/
	* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
	Don't use bfd_elf_record_link_assignment to mark __ehdr_start
	hidden.  Instead, just do it directly here, and only if it was
	referenced but not defined.

ld/testsuite/
	* ld-elf/ehdr_start-userdef.t: New file.
	* ld-elf/ehdr_start-userdef.d: New file.
	* ld-elf/ehdr_start-strongref.s: New file.
	* ld-elf/ehdr_start-missing.t: New file.
	* ld-elf/ehdr_start-missing.d: New file.
	* ld-elf/ehdr_start-weak.d: New file.
	* ld-mips-elf/ehdr_start-2.nd: Expect __ehdr_start to be global.
2013-11-19 10:54:00 -08:00
Chung-Lin Tang baa2af86d4 Separate emulations for nios2-elf and nios2-linux.
2013-11-18  Chung-Lin Tang  <cltang@codesourcery.com>

	* emulparams/nios2linux.sh: New emulation file.
	* configure.tgt: Add nios2*-*-linux* emulation case.
	* Makefile.am (enios2linux.c): New emulation entry.
	* Makefile.in: Regenerate.
2013-11-18 06:57:28 -08:00
H.J. Lu c33205431a Add R_X86_64_PC32_BND and R_X86_64_PLT32_BND
bfd/

	* elf64-x86-64.c (x86_64_elf_howto_table): Add R_X86_64_PC32_BND
	and R_X86_64_PLT32_BND.
	(R_X86_64_standard): Replace R_X86_64_RELATIVE64 with
	R_X86_64_PLT32_BND.
	(IS_X86_64_PCREL_TYPE): Add R_X86_64_PLT32_BND.
	(x86_64_reloc_map): Add BFD_RELOC_X86_64_PC32_BND and
	BFD_RELOC_X86_64_PLT32_BND.
	(elf_x86_64_check_relocs): Handle R_X86_64_PC32_BND and
	R_X86_64_PLT32_BND.
	(elf_x86_64_gc_sweep_hook): Likewise.
	(elf_x86_64_relocate_section): Likewise.
	* reloc.c (bfd_reloc_code_real): Add BFD_RELOC_X86_64_PC32_BND
	and BFD_RELOC_X86_64_PLT32_BND.
	* bfd-in2.h: Regenerated.
	* libbfd.h: Likewise.

gas/

	* config/tc-i386.c (reloc): Add an argument, bnd_prefix, to
	indicate if instruction has the BND prefix.  Return
	BFD_RELOC_X86_64_PC32_BND instead of BFD_RELOC_32_PCREL if
	bnd_prefix isn't zero.
	(output_branch): Pass BFD_RELOC_X86_64_PC32_BND to frag_var
	if needed.
	(output_jump): Update reloc call.
	(output_interseg_jump): Likewise.
	(output_disp): Likewise.
	(output_imm): Likewise.
	(x86_cons_fix_new): Likewise.
	(lex_got): Add an argument, bnd_prefix, to indicate if
	instruction has the BND prefix.  Use BFD_RELOC_X86_64_PLT32_BND
	if needed.
	(x86_cons): Update lex_got call.
	(i386_immediate): Likewise.
	(i386_displacement): Likewise.
	(md_apply_fix): Handle BFD_RELOC_X86_64_PC32_BND and
	BFD_RELOC_X86_64_PLT32_BND.
	(tc_gen_reloc): Likewise.
	* config/tc-i386-intel.c (i386_operator): Update lex_got call.

gas/testsuite/

	* gas/i386/i386.exp: Run x86-64-mpx-branch-1 and
	x86-64-mpx-branch-2 on 64-bit ELF targets.
	* gas/i386/x86-64-mpx-branch-1.d: New file.
	* gas/i386/x86-64-mpx-branch-1.s: Likewise.
	* gas/i386/x86-64-mpx-branch-2.d: Likewise.
	* gas/i386/x86-64-mpx-branch-2.s: Likewise.

include/elf/

	* x86-64.h: Add R_X86_64_PC32_BND and R_X86_64_PLT32_BND.

ld/testsuite/

	* ld-x86-64/mpx.exp: New file.
	* ld-x86-64/mpx1.out: Likewise.
	* ld-x86-64/mpx1a.c: Likewise.
	* ld-x86-64/mpx1a.rd: Likewise.
	* ld-x86-64/mpx1b.c: Likewise.
	* ld-x86-64/mpx1c.c: Likewise.
	* ld-x86-64/mpx1c.rd: Likewise.
2013-11-17 08:57:56 -08:00
Will Newton 180a9db096 ld/ARM: Fix script-type testsuite failure.
Commit 34a79995c4 changed how STT_FILE
symbols were emitted but this testcase got missed in the cleanup.

ld/testsuite/ChangeLog:

2013-11-14  Will Newton  <will.newton@linaro.org>

	* ld-arm/script-type.sym: Remove redundant STT_FILE symbol.
2013-11-14 08:39:59 +00:00
Roland McGrath 64b384e1e8 Set CPU type in BFD backend for x86_64-nacl* and i?86-nacl* targets
bfd/
	* archures.c (bfd_mach_i386_nacl): Fix definition so it doesn't
	collide with bfd_mach_l1om.
	* bfd-in2.h: Regenerate.

	* elf32-i386.c (elf32_i386_nacl_elf_object_p): New function.
	(elf_backend_object_p): Use that in elf32-i386-nacl definition.
	* elf64-x86-64.c (elf64_x86_64_nacl_elf_object_p): New function.
	(elf_backend_object_p): Use that in elf64-x86-64-nacl definition.
	(elf32_x86_64_nacl_elf_object_p): New function.
	(elf_backend_object_p): Use that in elf32-x86-64-nacl definition.

binutils/
	* objdump.c (dump_dwarf): Grok bfd_mach_x86_64_nacl and
	bfd_mach_x64_32_nacl as equivalent to bfd_mach_x86_64.

ld/testsuite/
	* ld-x86-64/x86-64.exp (mixed1, mixed2): Loosen error string match
	so it accepts "i386:nacl" in place of "i386".
	* ld-x86-64/ilp32-2.d: Likewise.
	* ld-x86-64/ilp32-3.d: Likewise.
	* ld-x86-64/lp64-2.d: Likewise.
	* ld-x86-64/lp64-3.d: Likewise.
2013-11-07 10:00:32 -08:00
H.J. Lu 62d887d406 Pass ignored unresolved relocations to ld backend
bfd/

	PR ld/4409
	* elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add an argument for
	error ignored.
	* elf-m10200.c (mn10200_elf_relocate_section): Updated.
	* elf-m10300.c (mn10300_elf_relocate_section): Likewise.
	* elf32-arm.c (elf32_arm_relocate_section): Likewise.
	* elf32-avr.c (elf32_avr_relocate_section): Likewise.
	* elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
	(bfin_relocate_section): Likewise.
	* elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
	* elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
	* elf32-cris.c (cris_elf_relocate_section): Likewise.
	* elf32-crx.c (elf32_crx_relocate_section): Likewise.
	* elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
	* elf32-epiphany.c (epiphany_elf_relocate_section): Likewise.
	* elf32-fr30.c (fr30_elf_relocate_section): Likewise.
	* elf32-frv.c (elf32_frv_relocate_section): Likewise.
	* elf32-h8300.c (elf32_h8_relocate_section): Likewise.
	* elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
	* elf32-i386.c (elf_i386_relocate_section): Likewise.
	* elf32-i860.c (elf32_i860_relocate_section): Likewise.
	* elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
	* elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
	* elf32-lm32.c (lm32_elf_relocate_section): Likewise.
	* elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
	* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
	* elf32-metag.c (elf_metag_relocate_section): Likewise.
	* elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
	* elf32-mcore.c (mcore_elf_relocate_section): Likewise.
	* elf32-mep.c (mep_elf_relocate_section): Likewise.
	* elf32-moxie.c (moxie_elf_relocate_section): Likewise.
	* elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
	* elf32-mt.c (mt_elf_relocate_section): Likewise.
	* elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
	* elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
	* elf32-rl78.c (rl78_elf_relocate_section): Likewise.
	* elf32-rx.c (rx_elf_relocate_section): Likewise.
	* elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
	* elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
	* elf32-s390.c (elf_s390_relocate_section): Likewise.
	* elf32-v850.c (v850_elf_relocate_section): Likewise.
	* elf32-vax.c (elf_vax_relocate_section): Likewise.
	* elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
	* elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
	* elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
	* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
	* elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
	* elf64-mmix.c (mmix_elf_relocate_section): Likewise.
	* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
	* elf64-s390.c (elf_s390_relocate_section): Likewise.
	* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
	* elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
	* elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
	* elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.

	* elfnn-ia64.c (elfNN_ia64_relocate_section): Skip if error
	from RELOC_FOR_GLOBAL_SYMBOL in executable is ignored.

ld/testsuite/

	PR ld/4409
	* ld-ia64/error1.d: New file.
	* ld-ia64/error1.s: Likewise.
	* ld-ia64/error2.d: Likewise.
	* ld-ia64/error3.d: Likewise.
2013-11-05 10:29:44 -08:00
Alan Modra 52a82034ac Edit ELFv2 global entry prologue to non-PIC
Changing addis r2,r12,..; addi r2,r2,.. to lis r2,..; addi r2,r2..
in non-PIC executables has the benefit of removing a dependency on r12.

bfd/
	* elf64-ppc.c (ppc64_elf_relocate_section): Edit global entry
	prologue to non-PIC in non-PIC executables.
ld/testsuite/
	* ld-powerpc/elfv2exe.d: Adjust for non-PIC global entry.
2013-11-04 10:21:32 +10:30
Alan Modra 4115bfc683 Allow for extra st_other readelf output in ld testsuite
On PowerPC64 ELFv2 readelf emits [<localentry>: 8] describing extra
symbol st_other bits.

	* ld-elfvers/vers24.rd: Allow extra readelf output after
	symbol visibility.
	* ld-ifunc/ifunc.exp: Likewise.
2013-11-04 10:18:47 +10:30
Alan Modra 14f2c47675 ld crossref test fix
* ld-scripts/crossref.exp: Don't allow changes made to CFLAGS
	for this test to bleed into following tests.  Don't set
	-mcall-aixdesc for powerpc64le.
2013-11-04 10:17:55 +10:30
Alan Modra c7c3f80e9c Assorted x86 testsuite fixes.
I think HJ has already fixed the binutils and ld tests with his
2013-09-27 readelf change, but this allows them to pass with wider
address output as per Nick's 2013-09-12 readelf change.

binutils/testsuite/
	* binutils-all/x86-64/compressed-1a.d: Allow wide display of addresses.
gas/testsuite/
	* gas/cfi/cfi-x86_64.d: Match when lacking end of section padding.
ld/testsuite/
	* ld-pe/cfi.d: Allow wide display of addresses.
2013-11-02 15:31:16 +10:30
Roland McGrath 61674ef7c5 x86_64-*-nacl*: Adjust test cases for PLT nop fix.
ld/testsuite/
	* ld-x86-64/plt-nacl.pd: Update expected disassembly for PLT nop fix.
	* ld-x86-64/tlsdesc-nacl.pd: Likewise.
2013-11-01 14:54:40 -07:00
Alan Modra d4a95d4999 Add PowerPC64 ELFv2 tests.
* ld-powerpc/elfv2.s,
	* ld-powerpc/elfv2so.d,
	* ld-powerpc/elfv2exe.d: New tests.
	* ld-powerpc/powerpc.exp: Run them.
2013-10-30 13:44:10 +10:30
Alan Modra 71a39c98f8 Change plt stubs to have destination in r12.
This change is to support the new ELFv2 ABI, which uses the value in
r12 on function entry to calculate the got/toc pointer.

bfd/
	* elf64-ppc.c (build_plt_stub): Switch stubs to use r11 as base
	reg and r12 as destination.
	(ppc_build_one_stub): Likewise.
	(ppc64_elf_build_stubs): Likewise for glink.
ld/testsuite/
	* ld-powerpc/tls.s: Add proper .opd entry for _start.
	* ld-powerpc/tlstoc.s: Likewise.
	* ld-powerpc/relbrlt.d: Update for changed stubs.
	* ld-powerpc/tls.d: Update for changed stubs and _start .opd entry.
	* ld-powerpc/tls.g: Likewise.
	* ld-powerpc/tlsexe.d: Likewise.
	* ld-powerpc/tlsexe.g: Likewise.
	* ld-powerpc/tlsexe.r: Likewise.
	* ld-powerpc/tlsexetoc.d: Likewise.
	* ld-powerpc/tlsexetoc.g: Likewise.
	* ld-powerpc/tlsexetoc.r: Likewise.
	* ld-powerpc/tlsso.d: Likewise.
	* ld-powerpc/tlsso.g: Likewise.
	* ld-powerpc/tlsso.r: Likewise.
	* ld-powerpc/tlstoc.d: Likewise.
	* ld-powerpc/tlstoc.g: Likewise.
	* ld-powerpc/tlstocso.d: Likewise.
	* ld-powerpc/tlstocso.g: Likewise.
	* ld-powerpc/tlstocso.r: Likewise.
2013-10-30 13:35:47 +10:30
Jan Beulich 34a79995c4 ld/ELF: refine fake STT_FILE symbol emission
There's no real need to emit these always: They're needed only if we
indeed want to emit a localized symbol. Hence defer emission until we
at least did the basic early checks that would lead to no such symbol
getting emitted. This in particular avoids emitting such a symbol in
the majority of (if not all) "ld -r" cases.

I hope my set of cross build tests caught all the test cases needing
adjustment - please forgive if I missed a few.

bfd/
2013-10-29  Jan Beulich <jbeulich@suse.com>

	* elflink.c (struct elf_outext_info): Add field file_sym_done.
	(bfd_elf_final_link): Initialize new field. Move fake STT_FILE
	symbol emission from here ...
	(elf_link_output_extsym): ... to here.

gas/testsuite/
2013-10-29  Jan Beulich <jbeulich@suse.com>

	* gas/microblaze/relax_size.elf: Drop expectation of no longer
	present STT_FILE symbol.
	* gas/microblaze/relax_size2.elf: Likewise.

ld/testsuite/
2013-10-29  Jan Beulich <jbeulich@suse.com>

	* ld-cris/tls-e-tpoffcomm1.d: Drop expectation of no longer
	present STT_FILE symbol.
	* ld-mmix/bpo-18.d: Likewise.
	* ld-mmix/bpo-22.d: Likewise.
	* ld-mmix/greg-6.d: Likewise.
	* ld-mmix/greg-7.d: Likewise.
	* ld-mmix/loc4.d: Likewise.
	* ld-mmix/local1.d: Likewise.
	* ld-mmix/local3.d: Likewise.
	* ld-mmix/local5.d: Likewise.
	* ld-mmix/local7.d: Likewise.
	* ld-mmix/loct-1.d: Likewise.
	* ld-sh/sh64/abi32.xd: Likewise.
	* ld-sh/sh64/abi64.xd: Likewise.
	* ld-sh/sh64/cmpct1.xd: Likewise.
	* ld-sh/sh64/crange1.rd: Likewise.
	* ld-sh/sh64/crange2.rd: Likewise.
	* ld-sh/sh64/crange3-cmpct.rd: Likewise.
	* ld-sh/sh64/crange3-media.rd: Likewise.
	* ld-sh/sh64/crange3.rd: Likewise.
	* ld-sh/sh64/crangerel1.rd: Likewise.
	* ld-sh/sh64/crangerel2.rd: Likewise.
	* ld-sh/sh64/mix1.xd: Likewise.
	* ld-sh/sh64/mix2.xd: Likewise.
	* ld-sh/sh64/shdl32.xd: Likewise.
	* ld-sh/sh64/shdl64.xd: Likewise.
2013-10-29 17:52:24 +01:00
Hans-Peter Nilsson 18080097c8 * ld-cris/asneed1.d: New test. 2013-10-18 02:38:35 +00:00
Chao-ying Fu 7c79037879 2013-10-14 Chao-ying Fu <Chao-ying.Fu@imgtec.com>
* ld-mips-elf/attr-gnu-8-0.s, ld-mips-elf/attr-gnu-8-1.s,
	ld-mips-elf/attr-gnu-8-2.s,
	ld-mips-elf/attr-gnu-8-00.d, ld-mips-elf/attr-gnu-8-01.d,
	ld-mips-elf/attr-gnu-8-02.d, ld-mips-elf/attr-gnu-8-10.d,
	ld-mips-elf/attr-gnu-8-11.d, ld-mips-elf/attr-gnu-8-12.d,
	ld-mips-elf/attr-gnu-8-20.d, ld-mips-elf/attr-gnu-8-21.d,
	ld-mips-elf/attr-gnu-8-22.d: New.
	* ld-mips-elf/mips-elf.exp: Run new tests.
2013-10-14 19:02:00 +00:00
Nick Clifton b2e951ec58 * gen-aout.c (main): Fix formatting. Close file.
* emultempl/aix.em (_read_file): Close file at end of function.

	* gas/all/itbl-test.c (main): Close fas.

	* read.c (add_include_dir): Use xrealloc.
	* config/tc-score.c (do_macro_bcmp): Initialise inst_main.
	* config/tc-tic6x.c (tic6x_parse_operand): Initialise second_reg.

	* readelf.c (decode_arm_unwind): Initialise addr structure.
	(process_symbol_table): Free lengths.
	* srcconv.c (wr_sc): Free info.

	* chew.c (perform): Free next.
2013-10-14 09:15:09 +00:00
Richard Sandiford 690f47bf98 ld/testsuite/
* lib/ld-lib.exp (default_ld_compile): Add a -I option for the source
	directory.
	* ld-mips-elf/compressed-plt-1.ld, ld-mips-elf/compressed-plt-1.s,
	ld-mips-elf/compressed-plt-1-dyn.s, ld-mips-elf/compressed-plt-1a.s,
	ld-mips-elf/compressed-plt-1b.s, ld-mips-elf/compressed-plt-1c.s,
	ld-mips-elf/compressed-plt-1d.s, ld-mips-elf/compressed-plt-1e.s,
	ld-mips-elf/compressed-plt-1-o32-se.rd,
	ld-mips-elf/compressed-plt-1-o32-se.od,
	ld-mips-elf/compressed-plt-1-o32-mips16-only.rd,
	ld-mips-elf/compressed-plt-1-o32-mips16-only.od,
	ld-mips-elf/compressed-plt-1-o32-umips-only.rd,
	ld-mips-elf/compressed-plt-1-o32-umips-only.od,
	ld-mips-elf/compressed-plt-1-o32-mips16.rd,
	ld-mips-elf/compressed-plt-1-o32-mips16.od,
	ld-mips-elf/compressed-plt-1-o32-mips16-got.rd,
	ld-mips-elf/compressed-plt-1-o32-mips16-got.od,
	ld-mips-elf/compressed-plt-1-o32-mips16-word.rd,
	ld-mips-elf/compressed-plt-1-o32-mips16-word.od,
	ld-mips-elf/compressed-plt-1-o32-umips.rd,
	ld-mips-elf/compressed-plt-1-o32-umips.od,
	ld-mips-elf/compressed-plt-1-o32-umips-got.rd,
	ld-mips-elf/compressed-plt-1-o32-umips-got.od,
	ld-mips-elf/compressed-plt-1-o32-umips-word.rd,
	ld-mips-elf/compressed-plt-1-o32-umips-word.od,
	ld-mips-elf/compressed-plt-1-n32-mips16.rd,
	ld-mips-elf/compressed-plt-1-n32-mips16.od,
	ld-mips-elf/compressed-plt-1-n32-umips.rd,
	ld-mips-elf/compressed-plt-1-n32-umips.od: New tests.
	* ld-mips-elf/mips-elf.exp: Run them.
2013-10-13 10:17:20 +00:00
Richard Sandiford c5d6fa4495 bfd/
* elfxx-mips.c (mips_use_local_got_p): New function.
	(mips_elf_count_got_symbols, mips_elf_calculate_relocation): Use it.
	(_bfd_mips_elf_check_relocs): Set pointer_equality_needed for
	GOT and absolute references.

ld/testsuite/
	* ld-mips-elf/pic-and-nonpic-6-n32.ad,
	ld-mips-elf/pic-and-nonpic-6-n32.dd,
	ld-mips-elf/pic-and-nonpic-6-n32.gd,
	ld-mips-elf/pic-and-nonpic-6-n32.nd,
	ld-mips-elf/pic-and-nonpic-6-n32.rd,
	ld-mips-elf/pic-and-nonpic-6-n64.ad,
	ld-mips-elf/pic-and-nonpic-6-n64.dd,
	ld-mips-elf/pic-and-nonpic-6-n64.gd,
	ld-mips-elf/pic-and-nonpic-6-n64.nd,
	ld-mips-elf/pic-and-nonpic-6-n64.rd,
	ld-mips-elf/pic-and-nonpic-6-o32.ad,
	ld-mips-elf/pic-and-nonpic-6-o32.dd,
	ld-mips-elf/pic-and-nonpic-6-o32.gd,
	ld-mips-elf/pic-and-nonpic-6-o32.nd,
	ld-mips-elf/pic-and-nonpic-6-o32.rd: Fix symbol value of extf4.
	No longer expect extf3, extf4 and extd2 to be in the global GOT.
2013-10-13 10:03:22 +00:00
Roland McGrath 18ff9b9b57 ld/
* ldmisc.c (vfinfo): Use Boolean ? "" : ":" in place of ":" + Boolean.
	It silences some compilers' warnings and is much less bizarre to read.
2013-10-10 22:50:40 +00:00
Roland McGrath 677e5a92b1 ld/
* emultempl/elf32.em (id_note_section_size): Use ATTRIBUTE_UNUSED
	rather than a dummy assignment for unused parameter.
	* plugin.c (get_input_file, release_input_file): Likewise.
2013-10-09 18:16:18 +00:00
Nick Clifton d9313f4f43 PR ld/16028
* ldmain.c (add_keepsyms_file): Close file at end of function.
2013-10-09 16:30:02 +00:00
Will Newton 1419bbe571 aarch64: Add support for GNU indirect functions.
Add support for STT_GNU_IFUNC symbols to the AArch64 bfd backend. The tests
are ported from the ld-ifunc tests but are enabled for cross builds so can
be run easily without hardware or a simulator.

bfd/ChangeLog:

2013-10-03  Will Newton  <will.newton@linaro.org>

	* configure: Regenerate.
	* configure.in: Build elf-ifunc.o for AArch64.
	* elfnn-aarch64.c: Include objalloc.h.
	(elfNN_aarch64_local_htab_hash): New function.
	(elfNN_aarch64_local_htab_eq): New function.
	(elfNN_aarch64_get_local_sym_hash): New function.
	(elfNN_aarch64_link_hash_table_create): Initialize local STT_GNU_IFUNC
	symbol hash.
	(elfNN_aarch64_hash_table_free): Free local STT_GNU_IFUNC symbol hash.
	(elfNN_aarch64_final_link_relocate): Add sym argument.  Add support
	for handling STT_GNU_IFUNC symbols.
	(elfNN_aarch64_gc_sweep_hook): Add support for garbage collecting
	references to STT_GNU_IFUNC symbols.
	(elfNN_aarch64_adjust_dynamic_symbol): Add support for handling
	STT_GNU_IFUNC symbols.
	(elfNN_aarch64_check_relocs): Add support for handling STT_GNU_IFUNC
	symbols.  Ensure we don't increase plt.refcount from -1 to 0.
	(elfNN_aarch64_post_process_headers): Call _bfd_elf_set_osabi.
	(elfNN_aarch64_is_function_type): Remove function.
	(elfNN_aarch64_allocate_dynrelocs): Handle STT_GNU_IFUNC symbols.
	(elfNN_aarch64_allocate_ifunc_dynrelocs): New function.
	(elfNN_aarch64_allocate_local_dynrelocs): New function.
	(elfNN_aarch64_allocate_local_ifunc_dynrelocs): New function.
	(elfNN_aarch64_size_dynamic_sections): Call
	elfNN_aarch64_allocate_local_dynrelocs.
	(elfNN_aarch64_create_small_pltn_entry): Add info argument.
	Add support for creating .iplt entries for STT_GNU_IFUNC symbols.
	(elfNN_aarch64_finish_dynamic_symbol): Add support for handling
	STT_GNU_IFUNC symbols and .iplt.
	(elfNN_aarch64_finish_local_dynamic_symbol): New function.
	(elfNN_aarch64_finish_dynamic_sections): Call
	elfNN_aarch64_finish_local_dynamic_symbol.

ld/ChangeLog:

2013-10-03  Will Newton  <will.newton@linaro.org>

	* emulparams/aarch64elf.sh: Add IREL_IN_PLT.
	* emulparams/aarch64elf32.sh: Likewise.

ld/testsuite/ChangeLog:

2013-10-03  Will Newton  <will.newton@linaro.org>

	* ld-ifunc/ifunc.exp: Enable ifunc tests for AArch64.
	* ld-aarch64/aarch64-elf.exp: Run ifunc tests.
	* ld-aarch64/ifunc-1-local.d: New file.
	* ld-aarch64/ifunc-1-local.s: Likewise.
	* ld-aarch64/ifunc-1.d: Likewise.
	* ld-aarch64/ifunc-1.s: Likewise.
	* ld-aarch64/ifunc-10.d: Likewise.
	* ld-aarch64/ifunc-10.s: Likewise.
	* ld-aarch64/ifunc-11.d: Likewise.
	* ld-aarch64/ifunc-11.s: Likewise.
	* ld-aarch64/ifunc-12.d: Likewise.
	* ld-aarch64/ifunc-12.s: Likewise.
	* ld-aarch64/ifunc-13.d: Likewise.
	* ld-aarch64/ifunc-13a.s: Likewise.
	* ld-aarch64/ifunc-13b.s: Likewise.
	* ld-aarch64/ifunc-14a.d: Likewise.
	* ld-aarch64/ifunc-14a.s: Likewise.
	* ld-aarch64/ifunc-14b.d: Likewise.
	* ld-aarch64/ifunc-14b.s: Likewise.
	* ld-aarch64/ifunc-14c.d: Likewise.
	* ld-aarch64/ifunc-14c.s: Likewise.
	* ld-aarch64/ifunc-14d.d: Likewise.
	* ld-aarch64/ifunc-14e.d: Likewise.
	* ld-aarch64/ifunc-14f.d: Likewise.
	* ld-aarch64/ifunc-15.d: Likewise.
	* ld-aarch64/ifunc-15.s: Likewise.
	* ld-aarch64/ifunc-16.d: Likewise.
	* ld-aarch64/ifunc-16.s: Likewise.
	* ld-aarch64/ifunc-17a.d: Likewise.
	* ld-aarch64/ifunc-17a.s: Likewise.
	* ld-aarch64/ifunc-17b.d: Likewise.
	* ld-aarch64/ifunc-17b.s: Likewise.
	* ld-aarch64/ifunc-18a.d: Likewise.
	* ld-aarch64/ifunc-18a.s: Likewise.
	* ld-aarch64/ifunc-18b.d: Likewise.
	* ld-aarch64/ifunc-18b.s: Likewise.
	* ld-aarch64/ifunc-19a.d: Likewise.
	* ld-aarch64/ifunc-19a.s: Likewise.
	* ld-aarch64/ifunc-19b.d: Likewise.
	* ld-aarch64/ifunc-19b.s: Likewise.
	* ld-aarch64/ifunc-2-local.d: Likewise.
	* ld-aarch64/ifunc-2-local.s: Likewise.
	* ld-aarch64/ifunc-2.d: Likewise.
	* ld-aarch64/ifunc-2.s: Likewise.
	* ld-aarch64/ifunc-20.d: Likewise.
	* ld-aarch64/ifunc-20.s: Likewise.
	* ld-aarch64/ifunc-3.s: Likewise.
	* ld-aarch64/ifunc-3a.d: Likewise.
	* ld-aarch64/ifunc-3b.d: Likewise.
	* ld-aarch64/ifunc-4.d: Likewise.
	* ld-aarch64/ifunc-4.s: Likewise.
	* ld-aarch64/ifunc-4a.d: Likewise.
	* ld-aarch64/ifunc-5-local.s: Likewise.
	* ld-aarch64/ifunc-5.s: Likewise.
	* ld-aarch64/ifunc-5a-local.d: Likewise.
	* ld-aarch64/ifunc-5a.d: Likewise.
	* ld-aarch64/ifunc-5b-local.d: Likewise.
	* ld-aarch64/ifunc-5b.d: Likewise.
	* ld-aarch64/ifunc-5r-local.d: Likewise.
	* ld-aarch64/ifunc-6.s: Likewise.
	* ld-aarch64/ifunc-6a.d: Likewise.
	* ld-aarch64/ifunc-6b.d: Likewise.
	* ld-aarch64/ifunc-7.s: Likewise.
	* ld-aarch64/ifunc-7a.d: Likewise.
	* ld-aarch64/ifunc-7b.d: Likewise.
	* ld-aarch64/ifunc-7c.d: Likewise.
	* ld-aarch64/ifunc-8.d: Likewise.
	* ld-aarch64/ifunc-8a.s: Likewise.
	* ld-aarch64/ifunc-8b.s: Likewise.
	* ld-aarch64/ifunc-9.d: Likewise.
	* ld-aarch64/ifunc-9.s: Likewise.
2013-10-03 14:46:09 +00:00
Nick Clifton cbb2b07e33 * emulparams/msp430all.sh: Update ARCH names.
* cpu-msp430.c: Use printable names that match the values
	displayed by readelf.
2013-09-30 09:03:59 +00:00
Richard Sandiford 2f9efdfcdb bfd/
2013-09-24  Gregory Fong  <gregory.0xf0@gmail.com>

	* elfxx-mips.c (mips_elf_create_got_section): Hide
	_GLOBAL_OFFSET_TABLE_.

ld/testsuite/
2013-09-24  Gregory Fong  <gregory.0xf0@gmail.com>

	* ld-mips-elf/eh-frame5.d, ld-mips-elf/jalx-2.dd,
	ld-mips-elf/mips-elf.exp, ld-mips-elf/mips16-pic-2.ad,
	ld-mips-elf/mips16-pic-2.nd, ld-mips-elf/pic-and-nonpic-3a.dd,
	ld-mips-elf/pic-and-nonpic-3b.ad, ld-mips-elf/pic-and-nonpic-3b.dd,
	ld-mips-elf/pic-and-nonpic-3b.nd, ld-mips-elf/pic-and-nonpic-4b.ad,
	ld-mips-elf/pic-and-nonpic-4b.nd, ld-mips-elf/pic-and-nonpic-4b.rd,
	ld-mips-elf/pic-and-nonpic-5b.ad, ld-mips-elf/pic-and-nonpic-5b.nd,
	ld-mips-elf/pic-and-nonpic-6-n32.ad,
	ld-mips-elf/pic-and-nonpic-6-n32.dd,
	ld-mips-elf/pic-and-nonpic-6-n32.nd,
	ld-mips-elf/pic-and-nonpic-6-n64.ad,
	ld-mips-elf/pic-and-nonpic-6-n64.dd,
	ld-mips-elf/pic-and-nonpic-6-n64.nd,
	ld-mips-elf/pic-and-nonpic-6-o32.ad,
	ld-mips-elf/pic-and-nonpic-6-o32.dd,
	ld-mips-elf/pic-and-nonpic-6-o32.nd, ld-mips-elf/rel32-n32.d,
	ld-mips-elf/rel32-o32.d, ld-mips-elf/rel64.d,
	ld-mips-elf/tls-multi-got-1.got, ld-mips-elf/tls-multi-got-1.r,
	ld-mips-elf/tlsdyn-o32-1.d, ld-mips-elf/tlsdyn-o32-1.got,
	ld-mips-elf/tlsdyn-o32-2.d, ld-mips-elf/tlsdyn-o32-2.got,
	ld-mips-elf/tlsdyn-o32-3.d, ld-mips-elf/tlsdyn-o32-3.got,
	ld-mips-elf/tlsdyn-o32.d, ld-mips-elf/tlsdyn-o32.got,
	ld-mips-elf/tlslib-o32-ver.got, ld-mips-elf/tlslib-o32.got: Update
	for removal of _GLOBAL_OFFSET_TABLE_ from .dynsym.
2013-09-24 22:15:38 +00:00
Alan Modra 6c668e71eb * emulparams/elf32ppccommon.sh (LIBPATH_SUFFIX): Provide 32-bit
and cross-endian values.
	* emulparams/elf64ppc.sh: Source elf32ppccomon.sh.  Delete duplicate,
	and unset unwanted variables.
2013-09-24 06:29:39 +00:00
Alan Modra 0f70b6b504 * genscripts.sh (LIB_PATH): Don't exclude libdir or tooldir when
sysrooted.  Also, don't always add tooldir when non-sysrooted.
	Instead add both when native and tooldir also when TOOL_DIR is
	defined.  Always prepend '=' to paths when sysrooted.  Always
	put paths with LIBPATH_SUFFIX first in search order.
2013-09-24 05:59:55 +00:00
Chung-Lin Tang ecb33a7949 2013-09-20 Chung-Lin Tang <cltang@codesourcery.com>
* Makefile.am (enios2elf.c): Change tdir_nios2 to tdir_nios2elf.
	* Makefile.in: Regenerate.
2013-09-20 10:27:11 +00:00
Alan Modra cc9afea3e4 * libtool.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical
ppc host match.  Support little-endian powerpc linux hosts.
Regenerate binutils configure files.
2013-09-20 09:51:25 +00:00
Kyrylo Tkachov 25f686c226 2013-09-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* ld-aarch64/eh-frame.d: Update expected output to allow for
	64-bit addresses.
2013-09-18 13:59:12 +00:00
Tristan Gingold 58ca03a25d binutils/
2013-09-18  Tristan Gingold  <gingold@adacore.com>

	* NEWS: Add marker for 2.24.

gas/
2013-09-18  Tristan Gingold  <gingold@adacore.com>

	* NEWS: Add marker for 2.24.

ld/
2013-09-18  Tristan Gingold  <gingold@adacore.com>

	* NEWS: Add marker for 2.24.
2013-09-18 10:39:38 +00:00
Nick Clifton 3d4a522e25 PR ld/15957
* deffilep.y (def_file_add_directive): Avoid readin past end of
	buffer.
2013-09-17 13:57:21 +00:00
Nick Clifton bf5117e32d * dwarf.c (dwarf_vmatoa): Rename to dwarf_vmatoa_1 and add a
precision parameter.
	(dwarf_vmatoa): New wrapper for dwarf_vmatoa_1.
	(print_dwarf_vma): Use dwarf_vmatoa_1.
	(SAFE_BYTE_GET): Add check that VAL is big enough to contain
	AMOUNT bytes.
	(process_debug_info): Use an unsigned int for the offset size.
	(process_debug_pubnames): Likewise.
	(display_debug_aranges): Likewise.
	(struct Frame_Chunk): Use dwarf_vma type for pc_begin and pc_range
	fields.
	(frame_display_row): Use print_dwarf_vma to display dwarf_vma
	values.
	(display_debug_frames): Likewise.

	* binutils-all/x86-64/compressed-1a.d: Update expected output to
	allow for 64-bit addresses.

	* ld-elf/eh1.d: Update expected output to allow for
	64-bit addresses.
	* ld-elf/eh2.d: Likewise.
	* ld-elf/eh3.d: Likewise.
	* ld-elf/eh4.d: Likewise.
	* ld-elf/eh5.d: Likewise.
	* ld-elf/eh6.d: Likewise.
	* ld-mips-elf/eh-frame1-n64.d: Likewise.
	* ld-mips-elf/eh-frame2-n64.d: Likewise.
	* ld-mips-elf/eh-frame3.d: Likewise.

	* gas/cfi/cfi-alpha-1.d: Update expected output to allow for
	64-bit addresses.
	* gas/cfi/cfi-alpha-3.d: Likewise.
	* gas/cfi/cfi-arm-1.d: Likewise.
	* gas/cfi/cfi-common-1.d: Likewise.
	* gas/cfi/cfi-common-2.d: Likewise.
	* gas/cfi/cfi-common-3.d: Likewise.
	* gas/cfi/cfi-common-4.d: Likewise.
	* gas/cfi/cfi-common-5.d: Likewise.
	* gas/cfi/cfi-common-6.d: Likewise.
	* gas/cfi/cfi-common-7.d: Likewise.
	* gas/cfi/cfi-hppa-1.d: Likewise.
	* gas/cfi/cfi-i386-2.d: Likewise.
	* gas/cfi/cfi-i386.d: Likewise.
	* gas/cfi/cfi-m68k.d: Likewise.
	* gas/cfi/cfi-mips-1.d: Likewise.
	* gas/cfi/cfi-ppc-1.d: Likewise.
	* gas/cfi/cfi-s390-1.d: Likewise.
	* gas/cfi/cfi-s390x-1.d: Likewise.
	* gas/cfi/cfi-sh-1.d: Likewise.
	* gas/cfi/cfi-sparc-1.d: Likewise.
	* gas/cfi/cfi-sparc64-1.d: Likewise.
	* gas/cfi/cfi-x86_64.d: Likewise.
2013-09-12 09:14:47 +00:00
Yufeng Zhang 0e80562ec2 ld/testsuite/
2013-09-04  Vidya Praveen  <vidyapraveen@arm.com>

	* ld-arm/export-class.exp: Fix the condition.
2013-09-04 14:35:13 +00:00
Jakub Jelinek 5c98a14e1e * elf64-x86-64.c (elf_x86_64_check_tls_transition): Allow
64-bit -mcmodel=large -fpic TLS GD and LD sequences.
	(elf_x86_64_relocate_section): Handle -mcmodel=large -fpic
	TLS GD and LD sequences in GD->LE, GD->IE and LD->LE transitions.
ld/testsuite/
	* ld-x86-64/x86-64.exp: Add tlsld3, tlsgd7 and tlsgd8 tests.
	* ld-x86-64/tlspic1.s: Add -mcmodel=large -fpic TLS GD and LD
	sequences.
	* ld-x86-64/tlspic.dd: Adjusted.
	* ld-x86-64/tlspic.rd: Adjusted.
	* ld-x86-64/tlspic-nacl.rd: Adjusted.
	* ld-x86-64/tlsld3.dd: New test.
	* ld-x86-64/tlsld3.s: New file.
	* ld-x86-64/tlsgd7.dd: New test.
	* ld-x86-64/tlsgd7.s: New file.
	* ld-x86-64/tlsgd8.dd: New test.
	* ld-x86-64/tlsgd8.s: New file.
2013-08-29 10:25:27 +00:00
Nick Clifton fe6d7d6aa2 PR ld/15896
* ld.texinfo: Fix uses of MB abbreviation.
2013-08-28 09:17:35 +00:00
Roland McGrath 1098fd41ac bfd/
* archures.c (bfd_mach_i386_nacl, bfd_mach_i386_i386_nacl): New macros.
	(bfd_mach_x86_64_nacl, bfd_mach_x64_32_nacl): New macros.
	* cpu-i386.c (bfd_arch_i386_onebyte_nop_fill): New function.
	(bfd_i386_nacl_arch): New variable.
	(bfd_x86_64_nacl_arch, bfd_x64_32_nacl_arch): New variables.
	(bfd_x64_32_arch_intel_syntax): Link them into the list.
	* bfd-in2.h: Regenerate.

ld/
	* emulparams/elf_i386_nacl.sh (ARCH): Set to i386:nacl.
	* emulparams/elf_x86_64_nacl.sh (ARCH): Set to i386:x86-64:nacl.
	* emulparams/elf32_x86_64_nacl.sh (ARCH): Set to i386:x64-32:nacl.

ld/testsuite/
	* ld-x86-64/x86-64.exp (Mixed x86_64 and i386 input test 1):
	Loosen string match to admit i386:x86-64*.
	(Mixed x86_64 and i386 input test 2): Likewise.
	* ld-x86-64/ilp32-2.d: Likewise.
	* ld-x86-64/ilp32-3.d: Likewise.
	* ld-x86-64/lp64-2.d: Likewise.
	* ld-x86-64/lp64-3.d: Likewise.
	* ld-x86-64/ia32-2.d: Likewise, and i386.* too.
	* ld-x86-64/ia32-3.d: Likewise.
2013-08-26 22:18:07 +00:00
Roland McGrath 887badb310 bfd/
* elf-nacl.c (nacl_modify_segment_map): Fix logic reordering the
	elf_segment_map list.  If an executable segment is page-aligned
	but does not end with a full page, then append a fake section into
	the segment map entry that pads out the page.
	(nacl_final_write_processing): New function.  Write the code fill
	laid out in nacl_modify_segment_map.
	* elf-nacl.h: Declare it.
	* elf32-arm.c (elf32_arm_nacl_final_write_processing): New function.
	(elf_backend_final_write_processing): Define it for NaCl backend.
	* elf32-i386.c (elf_backend_final_write_processing): Likewise.
	* elf64-x86-64.c (elf_backend_final_write_processing): Likewise.

	* elf-nacl.c (segment_eligible_for_headers): Rename MAXPAGESIZE
	parameter to MINPAGESIZE.
	(nacl_modify_segment_map): Use minpagesize instead of maxpagesize.

	* elf32-arm.c (ELF_MINPAGESIZE, ELF_COMMONPAGESIZE): Set to
	0x10000	for NaCl targets.

ld/testsuite/
	* ld-x86-64/ilp32-4-nacl.d: Loosen .shstrtab line regexp to match
	any file offset.
	* ld-x86-64/tlsbin-nacl.rd: Update expected code segment PT_LOAD.
	* ld-x86-64/tlsbindesc-nacl.rd: Likewise.
	* ld-scripts/rgn-at3.d: XFAIL for *-*-nacl* targets.
	* ld-scripts/rgn-over8-ok.d: Likewise.
2013-08-26 19:27:25 +00:00
Maciej W. Rozycki fe9cd7ab17 * ld-elf/comm-data.exp: Use check_shared_lib_support rather than
explicit patterns for test target qualification.  Define extra
	tool flags for *-*-hpux* and tic6x-*-* targets.  Link with a
	linker script.  Use alternative patterns for targets that do not
	eliminate copy relocs, currently mn10300-*-* and vax-*-*.
	* ld-elf/comm-data2.s: Handle HPUX's `.comm' syntax.
	* ld-elf/comm-data2.ld: New test linker script.
	* ld-elf/comm-data2.xd: Match section's VMA too.  Ignore ASCII
	data dump.
	* ld-elf/comm-data2r.rd: New test pattern.
	* ld-elf/comm-data2r.sd: New test pattern.
	* ld-elf/comm-data2r.xd: New test pattern.
	* ld-mips-elf/comm-data.exp: Use check_shared_lib_support rather
	than an explicit pattern for test target qualification.  Link
	with a linker script.
2013-08-24 22:37:18 +00:00
Maciej W. Rozycki aea6ea421d * ld-arm/export-class.exp: Handle non-EABI targets. 2013-08-24 22:27:00 +00:00
Roland McGrath 2e6b61f18f ld/testsuite/
* ld-x86-64/ilp32-4-nacl.d: Update for 2013-05-31 gas alignment change.
	* ld/testsuite/ld-x86-64/tlsbin-nacl.rd: Likewise.
	* ld/testsuite/ld-x86-64/tlsbindesc-nacl.rd: Likewise.
	* ld/testsuite/ld-x86-64/tlsdesc-nacl.rd: Likewise.
	* ld/testsuite/ld-x86-64/tlspic-nacl.rd: Likewise.
2013-08-23 23:13:46 +00:00
Roland McGrath 724e34c6f7 ld/
* emulparams/elf_nacl.sh (nacl_rodata_addr): Don't add in
	SIZEOF_HEADERS here; elf.sc does it already.
2013-08-23 22:38:42 +00:00
Nick Clifton 8c661d24dc Fix typo. 2013-08-23 15:21:53 +00:00
Nick Clifton 9aff4b7ac1 PR binutils/15834
Fix typos:
---
 bfd/bfdio.c                                  |  2 +-
 bfd/elf32-spu.c                              |  2 +-
 bfd/elfnn-aarch64.c                          |  2 +-
 binutils/od-xcoff.c                          |  2 +-
 config/tcl.m4                                |  2 +-
 gas/config/tc-ia64.c                         |  2 +-
 gas/config/tc-sparc.c                        |  2 +-
 gas/config/tc-z80.c                          | 12 ++++++------
 gas/doc/c-i386.texi                          |  6 +++---
 gas/doc/c-m32r.texi                          |  2 +-
 gas/testsuite/gas/d10v/instruction_packing.d |  2 +-
 gas/testsuite/gas/z80/atend.d                |  2 +-
 gold/object.h                                |  2 +-
 include/gdb/remote-sim.h                     |  2 +-
 include/opcode/ChangeLog                     |  2 +-
 include/opcode/i960.h                        |  2 +-
 ld/testsuite/ld-mips-elf/mips16-pic-1.inc    |  2 +-
 opcodes/aarch64-asm.c                        |  2 +-
 opcodes/aarch64-dis.c                        |  2 +-
 opcodes/msp430-dis.c                         |  2 +-
2013-08-23 07:54:19 +00:00
Nick Clifton 865acd3586 PR ld/15839
* scripttempl/avr.sc: Do not include gc'able sections into general
	sections during relocatable links.
2013-08-23 07:37:31 +00:00
Nick Clifton f69a2f978f * emultempl/pe.em: Add --disable-large-address-aware option.
* ld.texinfo (--disable-large-address-aware): Add documentation.
2013-08-22 15:28:42 +00:00
Alan Modra 65fd058fe6 * ld-powerpc/powerpc.exp: Substitute for le in options_regsub(ld).
Correct ppc64elftests option replacement.
	(supports_ppc64): Match elf64lppc too.
	* ld-powerpc/relbrlt.d: Update for little-endian.
	* ld-powerpc/symtocbase.d: Likewise.
	* ld-powerpc/tls.t: Likewise.
	* ld-powerpc/tlsexetoc.g: Likewise.
	* ld-powerpc/tlsso.d: Likewise.
	* ld-powerpc/tlsso.g: Likewise.
	* ld-powerpc/tlstoc.t: Likewise.
	* ld-powerpc/tlstocso.d: Likewise.
	* ld-powerpc/tlstocso.g: Likewise.
	* ld-powerpc/tlstocso.t: Likewise.
	* ld-powerpc/tocopt.d: Likewise.
	* ld-powerpc/tocopt2.d: Likewise.
	* ld-powerpc/tocopt3.d: Likewise.
	* ld-powerpc/tocopt4.d: Likewise.
	* ld-powerpc/tocopt5.d: Likewise.
2013-08-22 07:34:28 +00:00
Nick Clifton 2e53f7d601 * ldexp.c: Add LOG2CEIL() builtin function to linker script language
* ldgram.y: Likewise
	* ldlex.l: Likewise
	* NEWS: Mention the new feature.
	* ld.texinfo: Document the new feature.

	* ld-scripts/log2.exp: New: Run the new log2 test.
	* ld-scripts/log2.s: Source for the new test.
	* ld-scripts/log2.t: Linker script for new test.
2013-08-15 07:30:15 +00:00
Nick Clifton 62c34db3dc PR ld/15787
* elf32-arm.c (elf32_arm_final_link_relocate): Use origin of output
	segment containing the relocating symbol instead of assuming 0 for
	sb group relocations.

	* ld-arm/group-relocs-ldr-bad.s: Redefine bar into foo section
	beyond 16 bit offset width.
	* ld-arm/group-relocs-ldrs-bad.s: Likewise.
	* ld-arm/group-relocs-ldr-bad.d: Adjust expected result.
	* ld-arm/group-relocs-ldrs-bad.d: Likewise.
	* ld-arm/group-relocs.s: Add comments.  Move symbols used for sb
	group relocations into .data section.  Drop section zero.  Use pc/r0
	as base register when pc/sb group relocations are used.
	* ld-arm/group-relocs.d: Adjust expected result.
	* ld-arm/group-relocs-alu-bad-2.d: New test for sb group relocation.
	* ld-arm/group-relocs-ldc-bad-2.d: Likewise.
	* ld-arm/group-relocs-ldr-bad-2.d: New test for pc group relocation.
	* ld-arm/group-relocs-ldrs-bad-2.d: Likewise.
	* ld-arm/unresolved-2.d: Add sb relocation failure test.
	* ld-arm/group-relocs-alu-bad-2.s: New test source.
	* ld-arm/group-relocs-ldr-bad-2.s: Likewise.
	* ld-arm/group-relocs-ldrs-bad-2.s: Likewise.
	* ld-arm/group-relocs-ldc-bad-2.s: Likewise.
	* ld-arm/unresolved-2.s: Likewise.
	* ld-arm/arm-elf.exp: For group-relocs, drop section zero start
	definition.  Run the new tests.
2013-08-14 12:20:41 +00:00
Nick Clifton 4046d87a36 * elf32-rl78.c (rl78_elf_merge_private_bfd_data): Complain if G10
flag bits do not match.
	(rl78_elf_print_private_bfd_data): Describe G10 flag.

	* readelf.c (get_machine_flags): Handle RL78 G10 flag.

	* config/tc-rl78.c (elf_flags): New variable.
	(enum options): Add OPTION_G10.
	(md_longopts): Add mg10.
	(md_parse_option): Parse -mg10.
	(rl78_elf_final_processing): New function.
	* config/tc-rl78.c (tc_final_processing): Define.
	* doc/c-rl78.texi: Document -mg10 option.

	* rl78.c (E_FLAG_RL78_G10): Define.

	* lib/ld-lib.exp (check_shared_lib_support): Note that the RL78
	does not support shared library generation.
2013-08-09 10:40:04 +00:00