aboutsummaryrefslogtreecommitdiff
path: root/ld
AgeCommit message (Collapse)AuthorFilesLines
2016-09-20ld: Fix mistake in ChangeLogAndrew Burgess1-1/+1
The previous commit contained a small mistake in the ChangeLog, fixed in this commit.
2016-09-20ld: Extend documentation for EXCLUDE_FILEAndrew Burgess2-0/+20
There was a gap in the documentation of EXCLUDE_FILE that could cause confusion to a user. When writing an input section specifier like this: *(EXCLUDE_FILE (somefile.o) .text .text.*) this could mean one of the following: 1. All '.text' and '.text.*' from all files except for 'somefile.o', or 2. All '.text' from all files except 'somefile.o', and all '.text.*' sections from all files. It turns out that the second interpretation is correct, but the manual does not make this clear (to me at least). Hopefully this patch makes things clearer. ld/ChangeLog: * ld/ld.texinfo (Input Section Basics): Expand the description of EXCLUDE_FILE.
2016-09-14Fix ld --gc-section segfault with ARMv8-M entry function in absolute sectionThomas Preud'homme3-0/+18
bfd/ 2016-09-14 Thomas Preud'homme <thomas.preudhomme@arm.com> * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Only mark section not already marked. ld/ 2016-09-14 Thomas Preud'homme <thomas.preudhomme@arm.com> * testsuite/ld-arm/cmse-veneers.s: Add a test for ARMv8-M Security Extensions entry functions in absolute section. * testsuite/ld-arm/cmse-veneers.rd: Adapt expected output accordingly.
2016-09-14[ARC] Fix parsing dtpoff relocation expression.Claudiu Zissulescu6-0/+60
The assembler accepts dtpoff complex relocation expression like identifier@dtpoff + const. However, it doesn't accept an expression such as identifier@dtpoff@base + const. This patch solves this issue, and adds a number of tests. ld/ 2016-09-14 Claudiu Zissulescu <claziss@synopsys.com> * testsuite/ld-arc/tls-dtpoff.dd: New file. * testsuite/ld-arc/tls-dtpoff.rd: Likewise. * testsuite/ld-arc/tls-dtpoff.s: Likewise. * testsuite/ld-arc/tls-relocs.ld: Likewise. * testsuite/ld-arc/arc.exp: Add new tdpoff test. gas/ 2016-09-14 Claudiu Zissulescu <claziss@synopsys.com> * testsuite/gas/arc/tls-relocs2.d: New file. * testsuite/gas/arc/tls-relocs2.s: Likewise. * config/tc-arc.c (tokenize_arguments): Accept offsets when base is used.
2016-09-14Add support for disabling automatic generation of .eh_frame_hdr sections in ↵Nick Clifton5-11/+38
ELF based linkers. PR ld/20537 * emultempl/elf32.em: More OPTION_xxx values into an enum. Add OPTION_NO_EH_FRAME_HDR. (_add_options): Add support for --no-eh-frame-hdr. * ld.texinfo: Document new option. * lexsup.c (elf_shlib_list_options): List new option. * NEWS: Mention the new option.
2016-09-06Resolve size relocation with copy relocationH.J. Lu4-0/+30
We can resolve size relocation against symbol which needs copy relocation when building executable. bfd/ PR ld/20550 * elf64-x86-64.c (elf_x86_64_relocate_section): Resolve size relocation with copy relocation when building executable. ld/ PR ld/20550 * testsuite/ld-x86-64/pr20550a.s: New file. * testsuite/ld-x86-64/pr20550b.s: Likewise. * testsuite/ld-x86-64/x86-64.exp (x86_64tests): Add tests for PR ld/20550.
2016-09-06Do not pass host compiler sanitization flags on to linker testsuite.Nick Clifton3-4/+21
* Makefile.am (CFLAGS_FOR_TARGET): Define as a copy of CFLAGS but without any sanitization options. (CXXFLAGS_FOR_TARGET): Define as a copy of CXXFLAGS but without any sanitization options. (check-DEJAGNU): Pass CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET as CFLAGS and CXXFLAGS respectively.
2016-09-06Fix PR ld/20545 - relaxation bugs in avr backendSenthil Kumar Selvaraj5-0/+51
Prior to the patch, addends for relocs were being adjusted even if they went beyond an alignment boundary. This is wrong - to preserve alignment constraints, the relaxation logic adds as many padding bytes at the alignment boundary as was deleted, so addends beyond the boundary should not be adjusted. avr-prop-7.s reproduces this scenario. Also, prior to this patch, the relaxation logic assumed that the addr parameter pointed to the middle of the instruction to be deleted, and that addr - count would therefore be the shrinked instruction's address. This is true when actually shrinking instructions. The alignment constraints handling logic also invokes the same logic though, with addr as the starting offset of padding bytes and with count as the number of bytes to be deleted. Calculating the shrinked insn's address as addr - count is obviously wrong in this case - that offset would point to count bytes before the last non-padded byte. avr-prop-8.s reproduces this scenario. To fix scenario 1, the patch adds an additional check to ensure reloc addends aren't adjusted if they cross a shrink boundary. The shrink boundary is either the section size or an alignment boundary. Addends pointing at an alignment boundary don't need to be adjusted, as padding would occur and keep the boundary the same. Addends pointing at section size need to be adjusted though, as no padding occurs and the section size itself would get decremented. The patch records whether padding occured (did_pad) and uses that to detect and handle this condition. To fix scenario 2, the patch adds an additional parameter (delete_shrinks_insn) to elf32_avr_relax_delete_bytes to distinguish instruction bytes deletion from padding bytes deletion. It then uses that to correctly set shrinked_insn_address. bfd/ChangeLog: 2016-09-02 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com> PR ld/20545 * elf32-avr.c (elf32_avr_relax_delete_bytes): Add parameter delete_shrinks_insn. Modify computation of shrinked_insn_address. Compute shrink_boundary and adjust addend only if addend_within_shrink_boundary. (elf32_avr_relax_section): Modify calls to elf32_avr_relax_delete_bytes to pass extra parameter. ld/ChangeLog: 2016-09-02 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com> PR ld/20545 * testsuite/ld-avr/avr-prop-7.d: New test. * testsuite/ld-avr/avr-prop-7.s: New test. * testsuite/ld-avr/avr-prop-8.d: New test. * testsuite/ld-avr/avr-prop-8.s: New test.
2016-09-02Limit pr20513c/pr20513d to Linux and GNU targetsH.J. Lu3-0/+8
* testsuite/ld-elf/pr20513c.d: Limit to *-*-linux* and *-*-gnu* targets. * testsuite/ld-elf/pr20513d.d: Likewise.
2016-09-01Add tests for PR ld/20513H.J. Lu9-0/+84
PR ld/20513 * testsuite/ld-elf/pr20513a.d: New file. * testsuite/ld-elf/pr20513a.s: Likewise. * testsuite/ld-elf/pr20513b.d: Likewise. * testsuite/ld-elf/pr20513b.s: Likewise. * testsuite/ld-elf/pr20513c.d: Likewise. * testsuite/ld-elf/pr20513d.d: Likewise. * testsuite/ld-elf/pr20513e.d: Likewise. * testsuite/ld-elf/pr20513f.d: Likewise.
2016-08-31Ignore symbols defined in SHF_EXCLUDE sectionsAlan Modra2-0/+11
PR 20513 * ldlang.c (section_already_linked): Deal with SHF_EXCLUDE sections.
2016-08-31Adjust VLE testsuiteAlan Modra6-107/+105
To suit f7d69005. * testsuite/ld-powerpc/vle-multiseg-1.d: Adjust to suit segment change. * testsuite/ld-powerpc/vle-multiseg-2.d: Likewise. * testsuite/ld-powerpc/vle-multiseg-3.d: Likewise. * testsuite/ld-powerpc/vle-multiseg-6.d: Likewise. * testsuite/ld-powerpc/vle-reloc-2.d: Likewise.
2016-08-30Made tests to XFAIL for arc*-*-elf*.Cupertino Miranda3-0/+7
ld/ChangeLog: Cupertino Miranda <cmiranda@synopsys.com> * testsuite/ld-arc/tls_gs-01.d: Set to XFAIL on arc*-*-elf*. * testsuite/ld-arc/tls_ie-01.d: Likewise.
2016-08-29Run PR ld/19784 tests only if ifunc attribute worksH.J. Lu2-38/+52
* testsuite/ld-x86-64/x86-64.exp: Run PR ld/19784 tests only if ifunc attribute works.
2016-08-29i386: Issue an error on non-PIC call to IFUNC in PIC objectH.J. Lu13-44/+79
On i386, IFUNC function must be called via PLT. Since PLT in PIC object uses EBX register, R_386_PLT32 relocation must be used to call IFUNC function even when IFUNC function is defined locally. Linker should issue an error when R_386_PC32 relocation is used to call IFUNC function. Since PR ld/19784 tests doesn't use PLT relocation to local IFUNC function, they are moved to the x86-64 test directory. bfd/ PR ld/14961 PR ld/20515 * elf32-i386.c (elf_i386_check_relocs): Issue an error when R_386_PC32 relocation is used to call IFUNC function in PIC object. ld/ PR ld/14961 PR ld/20515 * testsuite/ld-i386/i386.exp: Run pr20515. * testsuite/ld-i386/pr20515.d: New file. * testsuite/ld-i386/pr20515.s: Likewise. * testsuite/ld-ifunc/ifunc-14a.s: Use R_386_PLT32 to call IFUNC function. * testsuite/ld-ifunc/ifunc-14c.s: Likewise. * testsuite/ld-ifunc/ifunc-2-i386.s: Likewise. * testsuite/ld-ifunc/ifunc-2-local-i386.s: Likewise. * testsuite/ld-ifunc/ifunc.exp: Move PR ld/19784 tests to ... * testsuite/ld-x86-64/x86-64.exp: Here. * testsuite/ld-ifunc/pr19784a.c: Moved to ... * testsuite/ld-x86-64/pr19784a.c: Here. * testsuite/ld-ifunc/pr19784b.c: Moved to ... * testsuite/ld-x86-64/pr19784b.c: Here. * testsuite/ld-ifunc/pr19784c.c: Moved to ... * testsuite/ld-x86-64/pr19784c.c: Here.
2016-08-26Reduce parameter list in bfd_elf32_arm_target_relocsThomas Preud'homme2-62/+72
2016-08-26 Thomas Preud'homme <thomas.preudhomme@arm.com> bfd/ * bfd-in.h (struct elf32_arm_params): Define. (bfd_elf32_arm_set_target_relocs): Rename into ... (bfd_elf32_arm_set_target_params): This. Use a struct elf32_arm_params to pass all parameters but the bfd and bfd_link_info. * bfd-in2.h: Regenerate. * elf32-arm.c (bfd_elf32_arm_set_target_relocs): Rename into ... (bfd_elf32_arm_set_target_params): This. Pass all values via a struct elf32_arm_params rather than as individual parameters. ld/ * emultempl/armelf.em (params): New static variable. (thumb_entry_symbol, byteswap_code, target1_is_rel, target2_type, fix_v4bx, use_blx, vfp11_denorm_fix, stm32l4xx_fix, fix_cortex_a8, no_enum_size_warning, no_wchar_size_warning, pic_veneer, merge_exidx_entries, fix_arm1176, cmse_implib): move as part of the above new structure. (arm_elf_before_allocation): Access static variable from the params structure. (gld${EMULATION_NAME}_finish): Likewise. (arm_elf_create_output_section_statements): Likewise and pass the address of that structure to bfd_elf32_arm_set_target_relocs instead of the static variables. (PARSE_AND_LIST_ARGS_CASES): Access static variable from the params structure.
2016-08-26Dynamic TLS GOT entries would not be relocated.Cupertino Miranda3-0/+25
Forgot to set should_relocate to TRUE in case of GOT and TLS relocations of undefined symbols for shared libraries. In dynamic libraries if symbol is not known the instruction relocation would not be resolved to point to the respective .got entry. A test was created to detect similar future mistakes. bfd/ChangeLog: Cupertino Miranda <cmiranda@synopsys.com> * elf32-arc.c (elf_arc_relocate_section): Changed. Set should_relocate to TRUE for GOT and TLS relocs. ld/ChangeLog: Cupertino Miranda <cmiranda@synopsys.com> * ld/testsuite/ld-arc/tls_gd-01.s: Added a testcase for this patch. * ld/testsuite/ld-arc/tls_gd-01.d: Likewise.
2016-08-26Content for TLS_IE_GOT not written to .got.Cupertino Miranda3-0/+24
When no dynamic relocation was generated the .got content would not be updated for the TLS_IE_GOT relocation addresses. bfd/ChangeLog: Cupertino Miranda <cmiranda@synopsys.com> * arc-got.h (relocate_fix_got_relocs_for_got_info): Fixed addresses in debug comments. Fixed address in .got related to TLS_IE_GOT dynamic relocation. ld/ChangeLog: Cupertino Miranda <cmiranda@synopsys.com> * testsuite/ld-arc/tls_ie-01.s: Added to verify associated fix. * testsuite/ld-arc/tls_ie-01.d: Likewise
2016-08-26Add support for stable secure gateway veneers addressesThomas Preud'homme13-3/+187
2016-08-26 Thomas Preud'homme <thomas.preudhomme@arm.com> bfd/ * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add a new parameter for the input import library bfd. * bfd-in2.h: Regenerate. * elf32-arm.c (struct elf32_arm_link_hash_table): New in_implib_bfd and new_cmse_stub_offset fields. (stub_hash_newfunc): Initialize stub_offset and stub_template_size to -1. (elf32_arm_add_stub): Likewise for stub_offset. (arm_new_stubs_start_offset_ptr): New function. (arm_build_one_stub): Only allocate a stub_offset if it is -1. Allow empty SG veneers to have zero relocations. (arm_size_one_stub): Only initialize stub size and template information for non empty veneers. Do not update veneer section size if veneer already has an offset. (elf32_arm_create_stub): Return the stub entry pointer or NULL instead of a boolean indicating success or failure. (cmse_scan): Change stub_changed parameter into an integer pointer parameter cmse_stub_created to count the number of stub created and adapt to change of return value in elf32_arm_create_stub. (cmse_entry_fct_p): New function. (arm_list_new_cmse_stub): Likewise. (set_cmse_veneer_addr_from_implib): Likewise. (elf32_arm_size_stubs): Define cmse_stub_created, pass its address to cmse_scan instead of that of cmse_stub_changed to compute the number of stub created and use it to initialize stub_changed. Call set_cmse_veneer_addr_from_implib after all cmse_scan. Adapt to change of return value in elf32_arm_create_stub. Use arm_stub_section_start_offset () if not NULL to initialize size of secure gateway veneers section. Initialize stub_offset of Cortex-A8 erratum fix to -1. Use ret to hold return value. (elf32_arm_build_stubs): Use arm_stub_section_start_offset () if not NULL to initialize size of secure gateway veneers section. Adapt comment to stress the importance of zeroing veneer section content. (bfd_elf32_arm_set_target_relocs): Add new in_implib_bfd parameter to initialize eponymous field in struct elf32_arm_link_hash_table. ld/ * emultempl/armelf.em (in_implib_filename): Declare and initialize new variable. (arm_elf_create_output_section_statements): Open import input library file for writing and pass resulting in_implib_bfd to bfd_elf32_arm_set_target_relocs. (PARSE_AND_LIST_PROLOGUE): Define OPTION_IN_IMPLIB option. (PARSE_AND_LIST_LONGOPTS): Define --in-implib option. (PARSE_AND_LIST_OPTIONS): Add help message for --in-implib option. (PARSE_AND_LIST_ARGS_CASES): Handle new OPTION_IN_IMPLIB case. * ld.texinfo (--cmse-implib): Update to mention --in-implib. (--in-implib): Document new option. * NEWS: Likewise. * testsuite/ld-arm/arm-elf.exp (Secure gateway import library generation): add --defsym VER=1 to gas CLI. (Secure gateway import library generation: errors): Likewise. (Input secure gateway import library): New test. (Input secure gateway import library: no output import library): Likewise. (Input secure gateway import library: not an SG input import library): Likewise. (Input secure gateway import library: earlier stub section base): Likewise. (Input secure gateway import library: later stub section base): Likewise. (Input secure gateway import library: veneer comeback): Likewise. (Input secure gateway import library: entry function change): Likewise. * testsuite/ld-arm/cmse-implib.s: Add input import library testing. * testsuite/ld-arm/cmse-implib.rd: Update accordingly. * testsuite/ld-arm/cmse-new-implib.out: New file. * testsuite/ld-arm/cmse-new-implib.rd: Likewise. * testsuite/ld-arm/cmse-new-implib-no-output.out: Likewise. * testsuite/ld-arm/cmse-new-implib-not-sg-in-implib.out: Likewise. * testsuite/ld-arm/cmse-new-earlier-later-implib.out: Likewise. * testsuite/ld-arm/cmse-new-comeback-implib.rd: Likewise. * testsuite/ld-arm/cmse-new-wrong-implib.out: Likewise.
2016-08-25powerpc ld configureAlan Modra2-32/+74
This fixes a few problems in the powerpc ld configury. 1) Using powerpc*le-* to test for powerpcle and powerpc64le would incorrectly match a target triple like powerpc-apple-elf. 2) In the same vein, *64* could match 64 in the user supplied MANUF-OS part of the target triple. 3) tooldir vars were missing, and some target aliases would result in ridiculous values for those tdir_* vars given. 4) Since 2016-04-25, BE support was added automatically when asking for an LE target. If that is a good idea, then so is adding LE support when asking for BE. * configure.tgt (powerpc*-*-linux* et al): Rewrite, adding LE support for BE. First output all target endian configury values, then opposite endian. Handle more tooldirs. Fix bogus matches with strings in MANUF-OS part of target triple.
2016-08-23Fix duplicate FAILs from ld testsuiteAlan Modra2-10/+9
* testsuite/lib/ld-lib.exp (run_cc_link_tests): Don't fail tests twice.
2016-08-19Enable relro by default for AArch64, ARM and SCORE.Nick Clifton5-0/+10
ld * emultempl/aarch64elf.em (before_parse): Initialise the relro field in the link_info structure. * emultempl/armelf.em (before_parse): Likewise. * emultempl/linux.em (before_parse): Likewise. * emultempl/scoreelf.em (before_parse): Likewise.
2016-08-19Place .shstrtab section after .symtab and .strtab, thus restoring ↵Nick Clifton101-187/+292
monotonically increasing section offsets. bfd * elf.c (assign_section_numbers): Assign number for the .shstrtab section after the symbol table and string table sections. binutils * testsuite/binutils-all/readelf.s: Adjust expected ordering of sections. * testsuite/binutils-all/readelf.s-64: Likewise. gas * testsuite/gas/i386/ilp32/x86-64-unwind.d: Adjust expected ordering of sections. * testsuite/gas/i386/x86-64-unwind.d: Likewise. * testsuite/gas/ia64/alias-ilp32.d: Likewise. * testsuite/gas/ia64/alias.d: Likewise. * testsuite/gas/ia64/group-1.d: Likewise. * testsuite/gas/ia64/group-2.d: Likewise. * testsuite/gas/ia64/secname-ilp32.d: Likewise. * testsuite/gas/ia64/secname.d: Likewise. * testsuite/gas/ia64/unwind-ilp32.d: Likewise. * testsuite/gas/ia64/unwind.d: Likewise. * testsuite/gas/ia64/xdata-ilp32.d: Likewise. * testsuite/gas/ia64/xdata.d: Likewise. * testsuite/gas/mmix/bspec-1.d: Likewise. * testsuite/gas/mmix/bspec-2.d: Likewise. * testsuite/gas/mmix/byte-1.d: Likewise. * testsuite/gas/mmix/loc-1.d: Likewise. * testsuite/gas/mmix/loc-2.d: Likewise. * testsuite/gas/mmix/loc-3.d: Likewise. * testsuite/gas/mmix/loc-4.d: Likewise. * testsuite/gas/mmix/loc-5.d: Likewise. * testsuite/gas/tic6x/scomm-directive-4.d: Likewise. ld * testsuite/ld-alpha/tlsbin.rd: Adjust expected ordering of sections. * testsuite/ld-alpha/tlsbinr.rd: Likewise. * testsuite/ld-alpha/tlspic.rd: Likewise. * testsuite/ld-cris/libdso-2.d: Likewise. * testsuite/ld-i386/nogot1.d: Likewise. * testsuite/ld-i386/pr12718.d: Likewise. * testsuite/ld-i386/pr12921.d: Likewise. * testsuite/ld-i386/tlsbin-nacl.rd: Likewise. * testsuite/ld-i386/tlsbin.rd: Likewise. * testsuite/ld-i386/tlsbin2-nacl.rd: Likewise. * testsuite/ld-i386/tlsbin2.rd: Likewise. * testsuite/ld-i386/tlsbindesc-nacl.rd: Likewise. * testsuite/ld-i386/tlsbindesc.rd: Likewise. * testsuite/ld-i386/tlsdesc-nacl.rd: Likewise. * testsuite/ld-i386/tlsdesc.rd: Likewise. * testsuite/ld-i386/tlsgdesc-nacl.rd: Likewise. * testsuite/ld-i386/tlsgdesc.rd: Likewise. * testsuite/ld-i386/tlsnopic-nacl.rd: Likewise. * testsuite/ld-i386/tlsnopic.rd: Likewise. * testsuite/ld-i386/tlspic-nacl.rd: Likewise. * testsuite/ld-i386/tlspic.rd: Likewise. * testsuite/ld-i386/tlspic2-nacl.rd: Likewise. * testsuite/ld-i386/tlspic2.rd: Likewise. * testsuite/ld-ia64/tlsbin.rd: Likewise. * testsuite/ld-ia64/tlspic.rd: Likewise. * testsuite/ld-mips-elf/attr-gnu-4-10.d: Likewise. * testsuite/ld-mips-elf/attr-gnu-4-50.d: Likewise. * testsuite/ld-mips-elf/attr-gnu-4-60.d: Likewise. * testsuite/ld-mips-elf/attr-gnu-4-70.d: Likewise. * testsuite/ld-mmix/bspec1.d: Likewise. * testsuite/ld-mmix/bspec2.d: Likewise. * testsuite/ld-mmix/local1.d: Likewise. * testsuite/ld-mmix/local3.d: Likewise. * testsuite/ld-mmix/local5.d: Likewise. * testsuite/ld-mmix/local7.d: Likewise. * testsuite/ld-mmix/undef-3.d: Likewise. * testsuite/ld-powerpc/tlsexe.r: Likewise. * testsuite/ld-powerpc/tlsexe32.r: Likewise. * testsuite/ld-powerpc/tlsexetoc.r: Likewise. * testsuite/ld-powerpc/tlsso.r: Likewise. * testsuite/ld-powerpc/tlsso32.r: Likewise. * testsuite/ld-powerpc/tlstocso.r: Likewise. * testsuite/ld-s390/tlsbin.rd: Likewise. * testsuite/ld-s390/tlsbin_64.rd: Likewise. * testsuite/ld-s390/tlspic.rd: Likewise. * testsuite/ld-s390/tlspic_64.rd: Likewise. * testsuite/ld-sh/sh64/crange1.rd: Likewise. * testsuite/ld-sh/sh64/crange2.rd: Likewise. * testsuite/ld-sh/sh64/crange3-cmpct.rd: Likewise. * testsuite/ld-sh/sh64/crange3-media.rd: Likewise. * testsuite/ld-sh/sh64/crange3.rd: Likewise. * testsuite/ld-sh/sh64/crangerel1.rd: Likewise. * testsuite/ld-sh/sh64/crangerel2.rd: Likewise. * testsuite/ld-sh/tlsbin-2.d: Likewise. * testsuite/ld-sh/tlspic-2.d: Likewise. * testsuite/ld-sparc/gotop32.rd: Likewise. * testsuite/ld-sparc/gotop64.rd: Likewise. * testsuite/ld-sparc/tlssunbin32.rd: Likewise. * testsuite/ld-sparc/tlssunbin64.rd: Likewise. * testsuite/ld-sparc/tlssunnopic32.rd: Likewise. * testsuite/ld-sparc/tlssunnopic64.rd: Likewise. * testsuite/ld-sparc/tlssunpic32.rd: Likewise. * testsuite/ld-sparc/tlssunpic64.rd: Likewise. * testsuite/ld-tic6x/common.d: Likewise. * testsuite/ld-tic6x/shlib-1.rd: Likewise. * testsuite/ld-tic6x/shlib-1b.rd: Likewise. * testsuite/ld-tic6x/shlib-1r.rd: Likewise. * testsuite/ld-tic6x/shlib-1rb.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1b.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1r.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1rb.rd: Likewise. * testsuite/ld-tic6x/shlib-noindex.rd: Likewise. * testsuite/ld-tic6x/static-app-1.rd: Likewise. * testsuite/ld-tic6x/static-app-1b.rd: Likewise. * testsuite/ld-tic6x/static-app-1r.rd: Likewise. * testsuite/ld-tic6x/static-app-1rb.rd: Likewise. * testsuite/ld-x86-64/ilp32-4-nacl.d: Likewise. * testsuite/ld-x86-64/ilp32-4.d: Likewise. * testsuite/ld-x86-64/nogot1.d: Likewise. * testsuite/ld-x86-64/pr12718.d: Likewise. * testsuite/ld-x86-64/pr12921.d: Likewise. * testsuite/ld-x86-64/split-by-file-nacl.rd: Likewise. * testsuite/ld-x86-64/split-by-file.rd: Likewise. * testsuite/ld-x86-64/tlsbin-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsbin.rd: Likewise. * testsuite/ld-x86-64/tlsbin2-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsbin2.rd: Likewise. * testsuite/ld-x86-64/tlsbindesc-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsbindesc.rd: Likewise. * testsuite/ld-x86-64/tlsdesc-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsdesc.rd: Likewise. * testsuite/ld-x86-64/tlsgdesc-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsgdesc.rd: Likewise. * testsuite/ld-x86-64/tlspic-nacl.rd: Likewise. * testsuite/ld-x86-64/tlspic.rd: Likewise. * testsuite/ld-x86-64/tlspic2-nacl.rd: Likewise. * testsuite/ld-x86-64/tlspic2.rd: Likewise. * testsuite/ld-xtensa/tlsbin.rd: Likewise. * testsuite/ld-xtensa/tlspic.rd: Likewise.
2016-08-18Fix thinko in new weak undefined function testAlan Modra2-1/+6
* testsuite/ld-undefined/weak-undef.exp: Use unsupported not unresolved.
2016-08-13Correct .dynsym sh_infoAlan Modra14-13/+29
bfd/ * elf-bfd.h (struct elf_link_hash_table): Add local_dynsymcount. * elflink.c (_bfd_elf_link_renumber_dynsyms): Set local_dynsymcount. (bfd_elf_final_link): Set .dynsym sh_info from local_dynsymcount. ld/ * testsuite/ld-tic6x/shlib-1.rd: Correct expected .dynsym sh_info. * testsuite/ld-tic6x/shlib-1b.rd: Likewise. * testsuite/ld-tic6x/shlib-1r.rd: Likewise. * testsuite/ld-tic6x/shlib-1rb.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1b.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1r.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1rb.rd: Likewise. * testsuite/ld-tic6x/shlib-noindex.rd: Likewise. * testsuite/ld-tic6x/static-app-1.rd: Likewise. * testsuite/ld-tic6x/static-app-1b.rd: Likewise. * testsuite/ld-tic6x/static-app-1r.rd: Likewise. * testsuite/ld-tic6x/static-app-1rb.rd: Likewise.
2016-08-12Add undefined weak function testsAlan Modra4-45/+91
* testsuite/ld-undefined/weak-fundef.s: New. * testsuite/ld-undefined/weak-undef.t: Don't specify filename. * testsuite/ld-undefined/weak-undef.exp: Run new tests. Rearrange much of old code. Use is_elf_format to select targets.
2016-08-11Fix ERROR: target-cc does not existAlan Modra2-6/+16
PR ld/20436 * testsuite/lib/ld-lib.exp (at_least_gcc_version): Don't ignore remote_exec status. (check_gcc_plugin_enabled): Likewise.
2016-08-11Avoid testsuite errors about missing compilers.Nick Clifton2-1/+11
PR ld/20436 * testsuite/lib/ld-lib.exp (check_gcc_plugin_enabled): When not testing remotely, check to see if target compiler is installed before trying to run it.
2016-08-11PR ld/15428: MIPS/LD/testsuite: Un-KFAIL `__ehdr_start' test 2Maciej W. Rozycki2-3/+6
Complement commit b75d42bce560 ("Fix mips segfault on GOT access of absolute symbol") and unmark the `__ehdr_start' test 2 as known to fail for the n32 and n64 ABIs, as with the change referred in place the causing issue has been properly addressed and consequently the tests do not fail anymore and neither are supposed to. ld/ PR ld/15428 * testsuite/ld-mips-elf/mips-elf.exp: Un-KFAIL `__ehdr_start' test 2.
2016-08-10MIPS/LD/testsuite: Verify microMIPS LA25 stub generationMaciej W. Rozycki8-0/+196
Repeat `PIC and non-PIC test 1' checks for microMIPS LA25 stubs, covering code generation and stub symbol annotation. ld/ * testsuite/ld-mips-elf/pic-and-nonpic-1-micromips-rel.dd: New test. * testsuite/ld-mips-elf/pic-and-nonpic-1-micromips-rel.nd: New test. * testsuite/ld-mips-elf/pic-and-nonpic-1-micromips.dd: New test. * testsuite/ld-mips-elf/pic-and-nonpic-1-micromips.nd: New test. * testsuite/ld-mips-elf/pic-and-nonpic-1a-micromips.s: New test source. * testsuite/ld-mips-elf/pic-and-nonpic-1b-micromips.s: New test source. * testsuite/ld-mips-elf/mips-elf.exp: Run the new tests.
2016-08-09Skip LTO tests for --disable-pluginH.J. Lu2-3/+35
Don't run LTO tests if compiler is configured with --disable-plugin. PR ld/20436 * testsuite/lib/ld-lib.exp (check_gcc_plugin_enabled): New proc. (check_lto_available): Return 0 if check_gcc_plugin_enabled returns 0. (check_lto_fat_available): Likewise. (check_lto_shared_available): Likewise.
2016-08-09Support -pie for arm*-eabi targets.Roland McGrath2-0/+5
ld/ * emulparams/armelf.sh (GENERATE_PIE_SCRIPT): Set to yes.
2016-08-05Add missing ChangLog enrtryH.J. Lu1-0/+7
2016-08-042016-08-04 Thomas Preud'homme <thomas.preudhomme@arm.com>Thomas Preud'homme7-1/+125
bfd/ * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add one parameter. * bfd-in2.h: Regenerate. * elf32-arm.c (struct elf32_arm_link_hash_table): Declare new cmse_implib field. (bfd_elf32_arm_set_target_relocs): Add new parameter to initialize cmse_implib field in struct elf32_arm_link_hash_table. (elf32_arm_filter_cmse_symbols): New function. (elf32_arm_filter_implib_symbols): Likewise. (elf_backend_filter_implib_symbols): Define to elf32_arm_filter_implib_symbols. ld/ * emultempl/armelf.em (cmse_implib): Declare and define this new static variable. (arm_elf_create_output_section_statements): Add new cmse_implib parameter. (OPTION_CMSE_IMPLIB): Define macro. (PARSE_AND_LIST_LONGOPTS): Add entry for new --cmse-implib switch. (PARSE_AND_LIST_OPTIONS): Likewise. (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_CMSE_IMPLIB case. * ld.texinfo (--cmse-implib): Document new option. * testsuite/ld-arm/arm-elf.exp (Secure gateway import library generation): New test. (Secure gateway import library generation: errors): Likewise. * testsuite/ld-arm/cmse-implib.s: New file. * testsuite/ld-arm/cmse-implib-errors.out: Likewise. * testsuite/ld-arm/cmse-implib.rd: Likewise.
2016-08-042016-08-04 Thomas Preud'homme <thomas.preudhomme@arm.com>Thomas Preud'homme9-0/+204
bfd/ * elf32-arm.c (CMSE_PREFIX): Define macro. (elf32_arm_stub_cmse_branch_thumb_only): Define stub sequence. (cmse_branch_thumb_only): Declare stub. (struct elf32_arm_link_hash_table): Define cmse_stub_sec field. (elf32_arm_get_plt_info): Add globals parameter. Use it to return FALSE if there is no PLT. (arm_type_of_stub): Adapt to new elf32_arm_get_plt_info signature. (elf32_arm_final_link_relocate): Likewise. (elf32_arm_gc_sweep_hook): Likewise. (elf32_arm_gc_mark_extra_sections): Mark sections holding ARMv8-M secure entry functions. (arm_stub_is_thumb): Add case for arm_stub_cmse_branch_thumb_only. (arm_dedicated_stub_output_section_required): Change to a switch case and add a case for arm_stub_cmse_branch_thumb_only. (arm_dedicated_stub_output_section_required_alignment): Likewise. (arm_stub_dedicated_output_section_name): Likewise. (arm_stub_dedicated_input_section_ptr): Likewise and remove ATTRIBUTE_UNUSED for htab parameter. (arm_stub_required_alignment): Likewise. (arm_stub_sym_claimed): Likewise. (arm_dedicated_stub_section_padding): Likewise. (cmse_scan): New function. (elf32_arm_size_stubs): Call cmse_scan for ARM M profile targets. Set stub_changed to TRUE if such veneers were created. (elf32_arm_swap_symbol_in): Add detection code for CMSE special symbols. include/ * arm.h (ARM_GET_SYM_CMSE_SPCL): Define macro. (ARM_SET_SYM_CMSE_SPCL): Likewise. ld/ * ld.texinfo (Placement of SG veneers): New concept entry. * testsuite/ld-arm/arm-elf.exp (Secure gateway veneers: no .gnu.sgstubs section): New test. (Secure gateway veneers: wrong entry functions): Likewise. (Secure gateway veneers (ARMv8-M Baseline)): Likewise. (Secure gateway veneers (ARMv8-M Mainline)): Likewise. * testsuite/ld-arm/cmse-veneers.s: New file. * testsuite/ld-arm/cmse-veneers.d: Likewise. * testsuite/ld-arm/cmse-veneers.rd: Likewise. * testsuite/ld-arm/cmse-veneers.sd: Likewise. * testsuite/ld-arm/cmse-veneers-no-gnu_sgstubs.out: Likewise. * testsuite/ld-arm/cmse-veneers-wrong-entryfct.out: Likewise.
2016-08-02Fix SH GOT allocation in the presence of linker garbage collection.Nick Clifton8-1/+40
PR ld/17739 ld * emulparams/shelf.sh (CHECK_RELOCS_AFTER_OPEN_INPUT): Define with valye 'yes'. * emulparams/shelf32.sh: Likewise. * emulparams/shelf32.sh: Likewise. * emulparams/shelf_nto.sh: Likewise. * emulparams/shelf_nto.sh: Likewise. * emulparams/shelf_vxworks.sh: Likewise. * emulparams/shelf_vxworks.sh: Likewise. * emulparams/shlelf32_linux.sh: Likewise. * emulparams/shlelf32_linux.sh: Likewise. * emulparams/shlelf_linux.sh: Likewise. * emulparams/shlelf_linux.sh: Likewise. * emulparams/shlelf_nto.sh: Likewise. * emulparams/shlelf_nto.sh: Likewise. bfd * elf32-sh.c (sh_elf_gc_sweep_hook): Delete. (elf_backend_sweep_hook): Delete.
2016-07-27MIPS/GAS: Implement microMIPS branch/jump compactionMaciej W. Rozycki3-16/+17
Convert microMIPS branches and jumps whose delay slot would be filled by a generated NOP instruction to the corresponding compact form where one exists, in a manner similar to MIPS16 JR->JRC and JALR->JALRC swap. Do so even where the transformation switches from a 16-bit to a 32-bit branch encoding for no benefit in code size reduction, as this is still advantageous. This is because a branch/NOP pair takes 2 pipeline slots or a 2-cycle completion latency except in superscalar implementations. Whereas a compact branch may or may not stall on its target fetch, so it will at most have a 2-cycle completion latency and may have only 1 even in scalar implementations, and in superscalar implementations it is expected to have no worse latency as a branch/NOP pair has. Also it won't stall and therefore take the extra latency cycle in the not-taken case. Technically this is the same as MIPS16 compaction: for the qualifying instruction encodings the APPEND_ADD_COMPACT machine code generation method is selected where APPEND_ADD_WITH_NOP otherwise would and tells the code generator in `append_insn' to convert the regular form of an instruction to its corresponding compact form. For this the opcode is tweaked as necessary and the microMIPS opcode table is scanned for the matching updated instruction. A non-$0 `rt' operand to BEQ and BNE instructions is moved to the `rs' operand field of BEQZC and BNEZC encodings as required. Unlike with MIPS16 compaction however we need to handle out-of-distance branch relaxation as well. We do this by deferring the generation of any delay-slot NOP required to relaxation made in `md_convert_frag', by converting the APPEND_ADD_WITH_NOP machine code generation to APPEND_ADD where a relaxed instruction is recorded. Relaxation then, depending on actual code produced, chooses between either using a compact branch or jump encoding and emitting the NOP outstanding if no compact encoding is possible. For code simplicity's sake the relaxation pass is retained even if the principle of preferring a compact encoding to a 16-bit branch/NOP pair means, in the absence of out-of-range branch relaxation, that a single compact branch machine code instruction will eventually be produced from a given assembly source instruction. gas/ * config/tc-mips.c (RELAX_MICROMIPS_ENCODE): Add `nods' flag. (RELAX_MICROMIPS_RELAX32, RELAX_MICROMIPS_TOOFAR16) (RELAX_MICROMIPS_MARK_TOOFAR16, RELAX_MICROMIPS_CLEAR_TOOFAR16) (RELAX_MICROMIPS_TOOFAR32, RELAX_MICROMIPS_MARK_TOOFAR32) (RELAX_MICROMIPS_CLEAR_TOOFAR32): Shift bits. (get_append_method): Also return APPEND_ADD_COMPACT for microMIPS instructions. (find_altered_mips16_opcode): Exclude macros from matching. Factor code out... (find_altered_opcode): ... to this new function. (find_altered_micromips_opcode): New function. (frag_branch_delay_slot_size): Likewise. (append_insn): Handle microMIPS branch/jump compaction. (macro_start): Likewise. (relaxed_micromips_32bit_branch_length): Likewise. (md_convert_frag): Likewise. * testsuite/gas/mips/micromips.s: Add conditional explicit NOPs for delay slot filling. * testsuite/gas/mips/micromips-b16.s: Add explicit NOPs for delay slot filling. * testsuite/gas/mips/micromips-size-1.s: Likewise. * testsuite/gas/mips/micromips.l: Adjust line numbers. * testsuite/gas/mips/micromips-warn.l: Likewise. * testsuite/gas/mips/micromips-size-1.l: Likewise. * testsuite/gas/mips/micromips.d: Adjust padding. * testsuite/gas/mips/micromips-trap.d: Likewise. * testsuite/gas/mips/micromips-insn32.d: Likewise. * testsuite/gas/mips/micromips-noinsn32.d: Likewise. * testsuite/gas/mips/micromips@beq.d: Update patterns for branch/jump compaction. * testsuite/gas/mips/micromips@bge.d: Likewise. * testsuite/gas/mips/micromips@bgeu.d: Likewise. * testsuite/gas/mips/micromips@blt.d: Likewise. * testsuite/gas/mips/micromips@bltu.d: Likewise. * testsuite/gas/mips/micromips@branch-misc-4.d: Likewise. * testsuite/gas/mips/micromips@branch-misc-4-64.d: Likewise. * testsuite/gas/mips/micromips@branch-misc-5.d: Likewise. * testsuite/gas/mips/micromips@branch-misc-5pic.d: Likewise. * testsuite/gas/mips/micromips@branch-misc-5-64.d: Likewise. * testsuite/gas/mips/micromips@branch-misc-5pic-64.d: Likewise. * testsuite/gas/mips/micromips@jal-svr4pic-local.d: Likewise. * testsuite/gas/mips/micromips@jal-svr4pic-local-n32.d: Likewise. * testsuite/gas/mips/micromips@jal-svr4pic-local-n64.d: Likewise. * testsuite/gas/mips/micromips@loc-swap.d: Likewise. * testsuite/gas/mips/micromips@loc-swap-dis.d: Likewise. * testsuite/gas/mips/micromips@relax.d: Likewise. * testsuite/gas/mips/micromips@relax-at.d: Likewise. * testsuite/gas/mips/micromips@relax-swap3.d: Likewise. * testsuite/gas/mips/branch-extern-2.d: Likewise. * testsuite/gas/mips/branch-extern-4.d: Likewise. * testsuite/gas/mips/branch-section-2.d: Likewise. * testsuite/gas/mips/branch-section-4.d: Likewise. * testsuite/gas/mips/branch-weak-2.d: Likewise. * testsuite/gas/mips/branch-weak-5.d: Likewise. * testsuite/gas/mips/micromips-branch-absolute.d: Likewise. * testsuite/gas/mips/micromips-branch-absolute-n32.d: Likewise. * testsuite/gas/mips/micromips-branch-absolute-n64.d: Likewise. * testsuite/gas/mips/micromips-branch-absolute-addend.d: Likewise. * testsuite/gas/mips/micromips-branch-absolute-addend-n32.d: Likewise. * testsuite/gas/mips/micromips-branch-absolute-addend-n64.d: Likewise. * testsuite/gas/mips/micromips-compact.d: New test. * testsuite/gas/mips/mips.exp: Run the new test. ld/ * testsuite/ld-mips-elf/micromips-branch-absolute.d: Update patterns for branch compaction. * testsuite/ld-mips-elf/micromips-branch-absolute-addend.d: Likewise. opcodes/ * micromips-opc.c (micromips_opcodes): Reorder "bc" next to "b", "beqzc" next to "beq", "bnezc" next to "bne" and "jrc" next to "j".
2016-07-27Restrict linker garbage collection personality test to cfi enabled targets.Nick Clifton2-2/+6
* testsuite/ld-gc/personality.d: Use "target cfi" to restrict the test to targets which support cfi.
2016-07-27Fix warning in ldbuildid.c mingw32 codeIgor Kudrin2-1/+6
* ldbuildid.c (generate_build_id): Warning fix.
2016-07-26MIPS/BFD: Handle branches in PLT compression selectionMaciej W. Rozycki15-24/+547
Complement: commit 1bbce132647e6d72aaa065cce5c1d5dd6585c2b2 Author: Maciej W. Rozycki <macro@linux-mips.org> Date: Mon Jun 24 23:55:46 2013 +0000 <https://sourceware.org/ml/binutils/2013-06/msg00077.html>, ("MIPS: Compressed PLT/stubs support"), and also choose between regular and compressed PLT entries as appropriate for any branches referring. bfd/ * elfxx-mips.c (mips_elf_calculate_relocation): Handle branches in PLT compression selection. (_bfd_mips_elf_check_relocs): Likewise. ld/ * testsuite/ld-mips-elf/compressed-plt-1.s: Add branch support. * testsuite/ld-mips-elf/compressed-plt-1a.s: Likewise. * testsuite/ld-mips-elf/compressed-plt-1b.s: Likewise. * testsuite/ld-mips-elf/compressed-plt-1-o32-branch.od: New test. * testsuite/ld-mips-elf/compressed-plt-1-o32-branch.rd: New test. * testsuite/ld-mips-elf/compressed-plt-1-o32-mips16-bronly.od: New test. * testsuite/ld-mips-elf/compressed-plt-1-o32-mips16-bronly.rd: New test. * testsuite/ld-mips-elf/compressed-plt-1-o32-mips16-branch.od: New test. * testsuite/ld-mips-elf/compressed-plt-1-o32-mips16-branch.rd: New test. * testsuite/ld-mips-elf/compressed-plt-1-o32-umips-bronly.od: New test. * testsuite/ld-mips-elf/compressed-plt-1-o32-umips-bronly.rd: New test. * testsuite/ld-mips-elf/compressed-plt-1-o32-umips-branch.od: New test. * testsuite/ld-mips-elf/compressed-plt-1-o32-umips-branch.rd: New test. * testsuite/ld-mips-elf/mips-elf.exp: Run the new tests.
2016-07-26Add support for creating uuid based build-id's in a MinGW32 environment.Igor Kudrin2-10/+41
ld * ldbuildid.c: Changes for MinGW32: Include windows.h and rpcdce.h. (validate_build_id_style): Allow "uuid" style. (generate_build_id): Fill in id_bits using UuidCreate().
2016-07-25Revise targets able to run ELF 64k section testAlan Modra2-8/+10
* testsuite/ld-elf/sec64k.exp: Run test for arc, msp430, or1k and m32r. Correct comment. Relax ld -r match to account for msp increased number of default sections.
2016-07-22Fix segfault in ARC linker when generating got entries for local symbols.Cupertino Miranda3-0/+17
bfd * arc-got.h (relocate_fix_got_relocs_for_got_info): Handle the case where there's no elf_link_hash_entry while processing GOT_NORMAL got entries. ld * testsuite/ld-arc/got-01.d: New file. * testsuite/ld-arc/got-01.s: New file.
2016-07-21Set BFD_VERSION to 2.27.51H.J. Lu2-10/+14
bfd/ * version.m4 (BFD_VERSION): Set to 2.27.51. * configure: Regenerated. binutils/ * configure: Regenerated. gas/ * configure: Regenerated. gprof/ * configure: Regenerated. ld/ * configure: Regenerated. opcodes/ * configure: Regenerated.
2016-07-21Move ChangeLog entry for PR ld/20376H.J. Lu1-6/+0
2016-07-21Use variable args in run_ld_link_exec_testsAlan Modra19-37/+61
If the last parameter of a tcl function is "args" then it can take zero or more arguments. Make use of this language feature in run_ld_link_exec_tests. * testsuite/lib/ld-lib.exp (run_ld_link_exec_tests): Replace "targets_to_xfail" parameter with "args". * testsuite/ld-elf/compress.exp: Remove empty list of xfails on all calls to run_ld_link_exec_tests. * testsuite/ld-elf/dwarf.exp: Likewise. * testsuite/ld-elf/indirect.exp: Likewise. * testsuite/ld-elf/wrap.exp: Likewise. * testsuite/ld-i386/i386.exp: Likewise. * testsuite/ld-i386/no-plt.exp: Likewise. * testsuite/ld-i386/tls.exp: Likewise. * testsuite/ld-ifunc/ifunc.exp: Likewise. * testsuite/ld-pie/pie.exp: Likewise. * testsuite/ld-plugin/lto.exp: Likewise. * testsuite/ld-size/size.exp: Likewise. * testsuite/ld-x86-64/mpx.exp: Likewise. * testsuite/ld-x86-64/no-plt.exp: Likewise. * testsuite/ld-x86-64/tls.exp: Likewise. * testsuite/ld-x86-64/x86-64.exp: Likewise. * testsuite/ld-elf/elf.exp: Likewise. Reorder args when providing xfails and simplify lists. * testsuite/ld-elf/shared.exp: Likewise.
2016-07-21Fix implib test failuresAlan Modra6-20/+56
bfd/ * elf.c (_bfd_elf_filter_global_symbols): Skip local symbols. (swap_out_syms): Return an error when not finding ELF output section rather than asserting. * elflink.c (elf_output_implib): Call bfd_set_error on no symbols. ld/ * testsuite/lib/ld-lib.exp (run_ld_link_tests): Add optional parameter to pass list of xfails. * testsuite/ld-elf/elf.exp: Add xfails for implib tests. Tidy implib test formatting. Don't set .data start address. * testsuite/ld-elf/implib.s: Remove first .bss directive and replace second one with equivalent .section directive. * testsuite/ld-elf/empty-implib.out: Add expected final error. * testsuite/ld-elf/implib.rd: Update.
2016-07-20Check p_paddr for program header spaceH.J. Lu1-0/+6
Issue an error if p_paddr becomes invalid when allocating space for program headers. PR ld/20376 * elf.c (assign_file_positions_for_load_sections): Also check p_paddr for program header space.
2016-07-20Early expression evaluationAlan Modra3-55/+37
Folding a constant expression early can lead to loss of tokens, eg. ABSOLUTE, that are significant in ld's horrible context sensitive expression evaluation. Also, MAXPAGESIZE and other "constants" may not have taken values specified on the command line, leading to the wrong value being cached. * ldexp.c (exp_unop, exp_binop, exp_trinop, exp_nameop): Don't fold expression. * testsuite/ld-elf/maxpage3b.d: Expect correct maxpagesize.
2016-07-19Support -pie for aarch64*-elf targets.Roland McGrath3-1/+10
ld/ * emulparams/aarch64elf.sh (GENERATE_PIE_SCRIPT): Set to yes. * emulparams/aarch64elf32.sh: Likewise.