aboutsummaryrefslogtreecommitdiff
path: root/ld
AgeCommit message (Collapse)AuthorFilesLines
2017-08-30PowerPC TPREL16_HA/LO reloc optimizationAlan Modra11-109/+191
In the TLS GD/LD to LE optimization, ld replaces a sequence like addi 3,2,x@got@tlsgd R_PPC64_GOT_TLSGD16 x bl __tls_get_addr(x@tlsgd) R_PPC64_TLSGD x R_PPC64_REL24 __tls_get_addr nop with addis 3,13,x@tprel@ha R_PPC64_TPREL16_HA x addi 3,3,x@tprel@l R_PPC64_TPREL16_LO x nop When the tprel offset is small, this can be further optimized to nop addi 3,13,x@tprel nop bfd/ * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt. (ppc64_elf_tls_optimize): Set it. (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when addis would add zero. * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt. (ppc_elf_tls_optimize): Set it. (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert insn on TPREL16_LO relocs to use r2 when addis would add zero. gold/ * powerpc.cc (Target_powerpc::Relocate::relocate): Nop addis on TPREL16_HA, and convert insn on TPREL16_LO and TPREL16_LO_DS relocs to use r2/r13 when addis would add zero. ld/ * testsuite/ld-powerpc/tls.s: Add calls with tls markers. * testsuite/ld-powerpc/tls32.s: Likewise. * testsuite/ld-powerpc/powerpc.exp: Run tls marker tests. * testsuite/ld-powerpc/tls.d: Adjust for TPREL16_HA/LO optimization. * testsuite/ld-powerpc/tlsexe.d: Likewise. * testsuite/ld-powerpc/tlsexetoc.d: Likewise. * testsuite/ld-powerpc/tlsld.d: Likewise. * testsuite/ld-powerpc/tlsmark.d: Likewise. * testsuite/ld-powerpc/tlsopt4.d: Likewise. * testsuite/ld-powerpc/tlstoc.d: Likewise.
2017-08-30PowerPC64 __tls_get_addr sequence optimizationAlan Modra8-30/+40
There isn't a good reason for ld.bfd to behave differently from gold in the code generated by TLS GD/LD to LE optimization. bfd/ * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing __tls_get_addr call sequences to LE, don't move the addi down to the nop. Replace the bl with addi and leave the nop alone. ld/ * testsuite/ld-powerpc/tls.d: Update. * testsuite/ld-powerpc/tlsexe.d: Update. * testsuite/ld-powerpc/tlsexetoc.d: Update. * testsuite/ld-powerpc/tlsld.d: Update. * testsuite/ld-powerpc/tlsmark.d: Update. * testsuite/ld-powerpc/tlsopt4.d: Update. * testsuite/ld-powerpc/tlstoc.d: Update.
2017-08-30testsuite/ld-cris various files: Run ld with --hash-style=sysv.Hans-Peter Nilsson50-49/+82
* testsuite/ld-cris/dso-pltdis1.d: Run ld with --hash-style=sysv. * testsuite/ld-cris/dso-pltdis2.d, testsuite/ld-cris/dso12-pltdis.d, testsuite/ld-cris/expdyn1.d, testsuite/ld-cris/expdyn5.d, testsuite/ld-cris/expdyn6.d, testsuite/ld-cris/expdyn7.d, testsuite/ld-cris/gotplt1.d, testsuite/ld-cris/gotplt2.d, testsuite/ld-cris/gotplt3.d, testsuite/ld-cris/hiddef1.d, testsuite/ld-cris/libdso-11.d, testsuite/ld-cris/libdso-12.d, testsuite/ld-cris/libdso-12b.d, testsuite/ld-cris/libdso-12c.d, testsuite/ld-cris/libdso-13.d, testsuite/ld-cris/libdso-13b.d, testsuite/ld-cris/libdso-14.d, testsuite/ld-cris/libdso-15.d, testsuite/ld-cris/libdso-15b.d, testsuite/ld-cris/libdso-1b.d, testsuite/ld-cris/libdso-1c.d, testsuite/ld-cris/libdso-1d.d, testsuite/ld-cris/libdso-4.d, testsuite/ld-cris/pr16044.d, testsuite/ld-cris/pv32-1.d, testsuite/ld-cris/tls-dso-dtpoffd2.d, testsuite/ld-cris/tls-dso-dtpoffd4.d, testsuite/ld-cris/tls-dso-tpoffgotcomm1.d, testsuite/ld-cris/tls-dso-x1x2-1.d, testsuite/ld-cris/tls-gc-71.d, testsuite/ld-cris/tls-ie-78.d, testsuite/ld-cris/tls-js1.d, testsuite/ld-cris/tls-ldgdex-14.d, testsuite/ld-cris/tls-ldgdex-15.d, testsuite/ld-cris/tls-legdx-16.d, testsuite/ld-cris/tls-legdx-17.d, testsuite/ld-cris/tls-local-63.d, testsuite/ld-cris/tls-local-64.d, testsuite/ld-cris/tls-ok-30.d, testsuite/ld-cris/tls-ok-32.d, testsuite/ld-cris/tls-ok-34.d, testsuite/ld-cris/tls-und-38.d, testsuite/ld-cris/tls-und-42.d, testsuite/ld-cris/tls-und-46.d, testsuite/ld-cris/tls-und-50.d, testsuite/ld-cris/weakref2.d, testsuite/ld-cris/weakref3.d, testsuite/ld-cris/weakref4.d: Likewise.
2017-08-29Improve MSP430 section placement.Jozef Lawrynowicz20-45/+1331
ld * emultempl/msp430.em (change_output_section): New function. (move_prefixed_section): New function. (add_region_prefix): New function. (msp430_elf_after_open): New function. (gld${EMULATION_NAME}_add_options): Implement. (gld${EMULATION_NAME}_list_options): Implement. (gld${EMULATION_NAME}_handle_option): Implement. * ld.texinfo: Document new options. * testsuite/ld-msp430-elf/main-bss-lower.d: New. * testsuite/ld-msp430-elf/main-bss-upper.d: New. * testsuite/ld-msp430-elf/main-const-lower.d: New. * testsuite/ld-msp430-elf/main-const-upper.d: New. * testsuite/ld-msp430-elf/main-text-lower.d: New. * testsuite/ld-msp430-elf/main-text-upper.d: New. * testsuite/ld-msp430-elf/main-var-lower.d: New. * testsuite/ld-msp430-elf/main-var-upper.d: New. * testsuite/ld-msp430-elf/main-with-data-bss-unique-sec.s: New. * testsuite/ld-msp430-elf/main-with-data-bss.s: New. * testsuite/ld-msp430-elf/main-with-text-rodata-unique-sec.s: New. * testsuite/ld-msp430-elf/main-with-text-rodata.s: New. * testsuite/ld-msp430-elf/msp430-elf.exp: New. * testsuite/ld-msp430-elf/msp430-no-lower.ld: New. * testsuite/ld-msp430-elf/msp430.ld: New. * emultempl/msp430.em (data_statement_size): New. (eval_upper_either_sections): New. (eval_lower_either_sections): New. (intermediate_relax_sections): New. (msp430_elf_after_allocation): New. * emultempl/msp430.em (gld${EMULATION_NAME}_place_orphan): Always place sections in the lower region. gas * config/tc-msp430.c (md_parse_option): Define high data and high bss symbols if -mdata-region is passed. Define -mdata-region open. * doc/c-msp430.texi: Document -mdata-region. * testsuite/gas/msp430/high-data-bss-sym.d: New test. * testsuite/gas/msp430/high-data-bss-sym.s: New. * testsuite/gas/msp430/msp430.exp: Add -mdata-region tests.
2017-08-26Disallow copy relocation against protected data symbolH.J. Lu11-0/+290
We shpouldn't generate copy relocation to resolve reference to protected data symbol defined in shared object with the NO_COPY_ON_PROTECTED property. This patch adds a bit to elf_obj_tdata as well as elf_i386_link_hash_entry and elf_x86_64_link_hash_entry to track the bfd with the NO_COPY_ON_PROTECTED property as well as protected symbol defined in shared object. extern_protected_data is set to FALSE if any input relocatable file contains the NO_COPY_ON_PROTECTED property. bfd/ PR ld/21997 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id, dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield. Add a has_no_copy_on_protected bitfield. (elf_has_no_copy_on_protected): New. * elf-properties.c (_bfd_elf_parse_gnu_properties): Set elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED. (elf_merge_gnu_property_list): Likewise. (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data to FALSE for elf_has_no_copy_on_protected. * elf32-i386.c (SYMBOL_NO_COPYRELOC): New. (elf_i386_link_hash_entry): Add def_protected. (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC when checking info->nocopyreloc. (elf_i386_link_setup_gnu_properties): Don't set extern_protected_data here. (elf_i386_merge_symbol_attribute): New function. (elf_backend_merge_symbol_attribute): New. * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New. (elf_x86_64_link_hash_entry): Add def_protected. (elf_x86_64_need_pic): Report protected symbol for def_protected. (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC when checking info->nocopyreloc. (elf_x86_64_relocate_section): Also check for R_X86_64_PC32 relocation run-time overflow and unresolvable R_X86_64_32S relocation against protected data symbol defined in shared object with GNU_PROPERTY_NO_COPY_ON_PROTECTED. (elf_x86_64_link_setup_gnu_properties): Don't set extern_protected_data here. (elf_x86_64_merge_symbol_attribute): New function. (elf_backend_merge_symbol_attribute): New. ld/ PR ld/21997 * testsuite/ld-i386/i386.exp: Run PR ld/21997 tests. * testsuite/ld-x86-64/x86-64.exp: Likewise. * testsuite/ld-i386/pr21997-1a.S: New file. * testsuite/ld-i386/pr21997-1b.c: Likewise. * testsuite/ld-i386/pr21997-1c.S: Likewise. * testsuite/ld-x86-64/pr21997-1a.S: Likewise. * testsuite/ld-x86-64/pr21997-1a.err: Likewise. * testsuite/ld-x86-64/pr21997-1b.c: Likewise. * testsuite/ld-x86-64/pr21997-1b.err: Likewise. * testsuite/ld-x86-64/pr21997-1c.c: Likewise.
2017-08-24ld: Add "--" after regexpH.J. Lu5-4/+12
Add "--" after regexp to support dejagnu 1.4.4. * testsuite/ld-elf/pr21903c.d: Remove '\' before --. * testsuite/ld-elf/pr21903d.d: Likewise. * testsuite/ld-elf/pr21903e.d: Likewise. * testsuite/lib/ld-lib.exp (run_dump_test): Add "--" after regexp.
2017-08-24ld: Replace regexp with string matchH.J. Lu3-4/+10
Replace regexp with string match to workaround dejagnu 1.4.4 which complains: ERROR: bad switch "-fPIE": must be -all, -about, -indices, -inline, -expanded, -line, -linestop, -lineanchor, -nocase, -start, or -- * testsuite/ld-i386/i386.exp (undefined_weak): Replace regexp with string match. * testsuite/ld-x86-64/x86-64.exp (undefined_weak): Likewise.
2017-08-24x86-64: Run pr22001-1b on x32H.J. Lu2-16/+37
Run pr22001-1b on x32 since R_X86_64_32S relocation can be turned into dynamic R_X86_64_32 relocation which won't overflow on x32. * testsuite/ld-x86-64/x86-64.exp: Run pr22001-1b on x32.
2017-08-24x86-64: Check relocations with -z nocopyrelocH.J. Lu11-0/+249
On x86-64, when -z nocopyreloc is used to build executable, relocations may overflow at run-time or may not be resolved without PIC. This patch checks these conditions and issues an error with suggestion for -fPIC. bfd/ PR ld/22001 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for R_X86_64_PC32 relocation run-time overflow and unresolvable R_X86_64_32S relocation with -z nocopyreloc. ld/ PR ld/22001 * testsuite/ld-i386/i386.exp: Run -z nocopyreloc tests. * testsuite/ld-x86-64/x86-64.exp: Likewise. * ld/testsuite/ld-i386/pr22001-1a.c: New file. * ld/testsuite/ld-i386/pr22001-1b.c: Likewise. * ld/testsuite/ld-i386/pr22001-1c.S: Likewise. * ld/testsuite/ld-x86-64/pr22001-1a.c: Likewise. * ld/testsuite/ld-x86-64/pr22001-1a.err: Likewise. * ld/testsuite/ld-x86-64/pr22001-1b.c: Likewise. * ld/testsuite/ld-x86-64/pr22001-1b.err: Likewise. * ld/testsuite/ld-x86-64/pr22001-1c.c: Likewise.
2017-08-24ld: Early detection of orphans we know will be discardedAndrew Burgess7-15/+98
When processing an orphan section we first call lang_place_orphans, this function handles a few sections for which the behaviour is known COMMON sections, or sections marked as SEC_EXCLUDE. Any orphans that are not handled in lang_place_orphans are passed on to ldlang_place_orphan, this is where we decide where to put the orphan, and then call lang_add_section to perform the actual orphan placement. We previously had a larger set of checks at the start of the function lang_add_section to discard some sections that we _knew_ should not be added into the output file, this was where .group sections (in a final link) and .debug* sections (with --strip-debug) were dropped. The problem with dropping these sections at the lang_add_section stage is that a user might also be using --orphan-handling=error to prevent orphans. If they are then they should not be get errors about sections that we know will be discarded, and which are not mentioned in the linker script. The solution proposed in this patch is to move the "will this section be discarded" check into a separate function, and use this in lang_place_orphans to have the early discard phase discard sections that we know should not be included in the output file. ld/ChangeLog: PR 21961 * ldlang.c (lang_discard_section_p): New function. (lang_add_section): Checks moved out into new function, which is now called. (lang_place_orphans): Call lang_discard_section_p instead of duplicating some of the checks from lang_add_section. * testsuite/ld-elf/orphan-11.d: New file. * testsuite/ld-elf/orphan-11.ld: New file. * testsuite/ld-elf/orphan-11.s: New file. * testsuite/ld-elf/orphan-12.d: New file. * testsuite/ld-elf/orphan-12.s: New file.
2017-08-24Test undefined symbols in shared librariesAlan Modra3-98/+195
git commit 46434633f9 said Make undefined symbols in allocate_dynrelocs dynamic ..if they have dynamic relocs. An undefined symbol in a PIC object that finds no definition ought to become dynamic in order to support --allow-shlib-undefined, but there is nothing in the generic ELF linker code to do this if the reference isn't via the GOT or PLT. (An initialized function pointer is an example.) So it falls to backend code to ensure the symbol is made dynamic. The above isn't true. Undefined symbols are indeed made dynamic for shared libraries. Undefined symbols are not automatically made dynamic in executables, and it was the PIE case that triggered an internal consistency assertion on powerpc64. I guess I could have jumped the other way when fixing PR21988, and not created a dynamic reloc. Either way, it doesn't matter a great deal. We're going to get an error on strong undefined symbols in an executable anyway, and broken binaries if you try to use --unresolved-symbols=ignore-all to disable the error. * testsuite/ld-undefined/fundef.s: New test. * testsuite/ld-undefined/undefined.exp: Test that undefined symbols in shared libraries are made dynamic.
2017-08-23Update PR ld/21903 tests for dejagnu 1.4.4H.J. Lu4-3/+9
Add '\' before -- to workaround dejagnu 1.4.4 which complains: ERROR: bad switch "--no-define-common may not be used without -shared":... * testsuite/ld-elf/pr21903c.d: Add '\' before --. * testsuite/ld-elf/pr21903d.d: Likewise. * testsuite/ld-elf/pr21903e.d: Likewise.
2017-08-23x86-64: Properly report output type when PIC is neededH.J. Lu5-4/+11
-fPIC may be needed to compile PIE or PDE objects, not just shared object. bfd/ * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for bfd_link_info. Report shared, PIE or PDE object based on bfd_link_info. (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call. (elf_x86_64_relocate_section): Likewise. ld/ * testsuite/ld-x86-64/pie2.d: Updated. * testsuite/ld-x86-64/pr19719.d: Likewise. * testsuite/ld-x86-64/pr19807-2a.d: Likewise. * testsuite/ld-x86-64/pr19969.d: Likewise.
2017-08-23x86: Clear extern_protected_data for GNU_PROPERTY_NO_COPY_ON_PROTECTEDH.J. Lu7-0/+99
When GNU_PROPERTY_NO_COPY_ON_PROTECTED is set, it indicates that there are no copy relocations against protected data symbols. When linker sees GNU_PROPERTY_NO_COPY_ON_PROTECTED on any input relocatable file, it sets extern_protected_data to FALSE. bfd/ * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED is set on any input relocatable file. * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise. ld/ * testsuite/ld-i386/i386.exp: Run protected7. * testsuite/ld-i386/protected7.d: New file. * testsuite/ld-i386/protected7.s: Likewise. * testsuite/ld-x86-64/protected8.d: Likewise. * testsuite/ld-x86-64/protected8.s: Likewise. * testsuite/ld-x86-64/x86-64.exp: Run protected8.
2017-08-23Remove pr19161 test hppa xfailAlan Modra2-1/+5
* testsuite/ld-gc/pr19161.d: Don't xfail hppa.
2017-08-22Update PR ld/21964 testsH.J. Lu8-52/+107
* testsuite/ld-elf/pr21964-1a.c (foo): Renamed to ... (foo1): This. * testsuite/ld-elf/pr21964-1b.c: Rewrite. * testsuite/ld-elf/pr21964-1c.c: New file. * testsuite/ld-elf/pr21964-2c.c: Likewise. * testsuite/ld-elf/pr21964-2a.c (foo): Renamed to ... (foo1): This. * testsuite/ld-elf/pr21964-2b.c: Rewrite. * testsuite/ld-elf/shared.exp: Update PR ld/21964 tests.
2017-08-21Make __start/__stop symbols protected visibilityAlan Modra26-25/+136
They can't be hidden visibility since apparently people use dlsym to look them up. bfd/ PR ld/21964 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols. * elflink.c (bfd_elf_define_start_stop): Rewrite. ld/ PR ld/21964 * testsuite/ld-elf/pr21562a.d: Update for changed start/stop symbols. * testsuite/ld-elf/pr21562b.d: Likewise. * testsuite/ld-elf/pr21562c.d: Likewise. * testsuite/ld-elf/pr21562d.d: Likewise. * testsuite/ld-elf/pr21562e.d: Likewise. * testsuite/ld-elf/pr21562f.d: Likewise. * testsuite/ld-elf/pr21562g.d: Likewise. * testsuite/ld-elf/pr21562h.d: Likewise. * testsuite/ld-elf/pr21562i.d: Likewise. * testsuite/ld-elf/pr21562j.d: Likewise. * testsuite/ld-elf/pr21562k.d: Likewise. * testsuite/ld-elf/pr21562l.d: Likewise. * testsuite/ld-elf/pr21562m.d: Likewise. * testsuite/ld-elf/pr21562n.d: Likewise. * testsuite/ld-elf/sizeofa.d: Likewise. * testsuite/ld-elf/sizeofb.d: Likewise. * testsuite/ld-elf/startofa.d: Likewise. * testsuite/ld-elf/startofb.d: Likewise. * testsuite/ld-gc/pr20022.d: Likewise. * testsuite/ld-gc/start.d: Likewise. * testsuite/ld-elf/pr21964-1a.c: New file. * testsuite/ld-elf/pr21964-1b.c: New file. * testsuite/ld-elf/pr21964-2a.c: New file. * testsuite/ld-elf/pr21964-2b.c: New file. * testsuite/ld-elf/shared.exp: Run PR ld/21964 tests.
2017-08-21PR ld/20125, MMIX weak symbolsHans-Peter Nilsson3-0/+29
Weak undefineds with PUSHJ relocs were "lost", causing internal inconsistencies and an abort.
2017-08-20Update testsuite/ld-x86-64/plt-main-bnd.ddH.J. Lu2-1/+7
2017-08-20 A. Wilcox <awilfox@adelielinux.org> PR ld/21976 * testsuite/ld-x86-64/plt-main-bnd.dd: Accept '_' in symbol name.
2017-08-17Add new Brazilian Portuguese translation for the ld subdirectory.Nick Clifton4-2/+2958
* po/pt_BR.po: New Brazilian Portuguese translation. * configure.ac (ALL_LINGUAS): Add pt_BR. * configure: Regenerate.
2017-08-14PR21441, Unnecessary padding of .eh_frame sectionAlan Modra3-10/+8
Until all .eh_frame sections have been edited we don't know their sizes. So it isn't possible to properly decide whether a non-empty .eh_frame section follows a given section until editing is complete. bfd/ PR 21441 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add alignment padding here. * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here in a reverse pass over sections. ld/ PR 21441 * testsuite/ld-x86-64/pr21038a.d: Adjust. * testsuite/ld-x86-64/pr21038a-now.d: Adjust.
2017-08-13ld: Restore linker scripts in PR ld/21884 testsH.J. Lu11-0/+67
OUTPUT_FORMAT in linker script of PR ld/21884 tests is needed to trigger PR ld/21884. Restore linker scripts and add nacl versions of the same tests. * testsuite/ld-i386/i386.exp: Run pr21884-nacl. * testsuite/ld-x86-64/x86-64.exp: Likewise. * testsuite/ld-i386/pr21884.d: Don't run on nacl targets. * testsuite/ld-x86-64/pr21884.d: Likewise. * testsuite/ld-i386/pr21884.t: Revert the last change. * testsuite/ld-x86-64/pr21884.t: Likewise. * testsuite/ld-i386/pr21884-nacl.d: New file. * testsuite/ld-i386/pr21884-nacl.t: Likewise. * testsuite/ld-x86-64/pr21884-nacl.d: Likewise. * testsuite/ld-x86-64/pr21884-nacl.t: Likewise.
2017-08-13Fix i686-nacl and x86_64-nacl pr21884 failuresAlan Modra3-8/+5
OUTPUT_FORMAT in the script results in "./ld-new: target elf32-i386 not found" and similarly for the x86_64 test. * testsuite/ld-i386/pr21884.t: Remove unneeded format, arch and entry. * testsuite/ld-x86-64/pr21884.t: Likewise.
2017-08-11Add -z globalaudit linker command line option to set the DF_GLOBALAUDIT flag ↵Nick Clifton7-0/+36
bit in the dynamic tags. * emultempl/elf32.em (handle_option): Accept the -z globalaudit command line option. * lexsup.c (elf_static_list_options): Add -z globalaudit. * ld.texinfo: Document the support for the new command line option. * NEWS: Mention the new feature. * testsuite/ld-elf/audit.exp: Add a test of the -z globalaudit command line option. * testsuite/ld-elf/globalaudit.rd: New file: Expected output from readelf.
2017-08-11Add 2 more tests for PR ld/21884H.J. Lu7-0/+52
PR ld/21884 * testsuite/ld-i386/i386.exp: Run pr21884. * testsuite/ld-x86-64/x86-64.exp: Likewise. * testsuite/ld-i386/pr21884.d: New file. * testsuite/ld-i386/pr21884.t: Likewise. * testsuite/ld-x86-64/pr21884.d: Likewise. * testsuite/ld-x86-64/pr21884.t: Likewise.
2017-08-10Add support for PE startup files that want to define their own constructor ↵Nick Clifton3-16/+43
and desctructor sequencing. * scripttempl/pep.sc: Enclose __CTOR_LIST__, ___CTOR_LIST__, __DTOR_LIST__ and ___DTOR_LIST__ in PROVIDE statements so that they can be overrridden by crt input files. * scripttempl/pe.sc: Likewise.
2017-08-09LD_CLASS: Check .libs/ld-new for linker firstH.J. Lu2-1/+7
When --enable-shared is used, ./ld-new may be a shell script and the real linker is .libs/ld-new. We should check .libs/ld-new first. * testsuite/config/default.exp (LD_CLASS): Check .libs/ld-new for linker first.
2017-08-09Run PR ld/17618 test only with 64-bit ELF linkerH.J. Lu4-2/+23
PR ld/17618 test requires 64-bit linker to run. Set LD_CLASS to "64bit" for 64-bit ELF linker and run PR ld/17618 test only if $LD_CLASS is "64bit". More checks can be added to support 64-bit linkers in non-ELF format. * testsuite/config/default.exp (LD_CLASS): New. Set to "64bit" for 64-bit ELF linker. * testsuite/ld-x86-64/pr17618.d (#notarget): Removed. * testsuite/ld-x86-64/x86-64.exp: Run pr17618 only for 64-bit linker.
2017-08-08ld: Require GCC 5 or above for 3 x86 testsH.J. Lu3-27/+44
Require GCC 5 or above for 3 x86 tests which fail with GCC 4.9.3. PR ld/21924 * testsuite/ld-i386/i386.exp: Require GCC 5 or above for "weakundef1 with PIE" test. * testsuite/ld-x86-64/tls.exp: Require GCC 5 or above for "tlsdesc1" and "tlsdesc1 with PIE" tests.
2017-08-08ld: Add a ',' after -Wl,--rpathH.J. Lu3-2/+7
* configure.ac (TESTBFDLIB): Add a ',' after -Wl,--rpath. * configure: Regenerated.
2017-08-08ld: Replace --rpath with -Wl,--rpathH.J. Lu3-2/+9
"--rpath ../bfd/.libs ../bfd/.libs/libbfd.so" isn't a valid compiler command-line option. We should use -Wl,--rpath instead of --rpath. PR ld/21923 * configure.ac (TESTBFDLIB): Replace --rpath with -Wl,--rpath for --disable-static. * configure: Regenerated.
2017-08-08Add configure flag to enable gnu hash style by default.Romain Geissler5-3/+96
ld/ * configure.ac: Add --enable-default-hash-style option. * ldmain.c (main): Set link_info.emit_hash to DEFAULT_EMIT_SYSV_HASH. Set link_info.emit_gnu_hash to DEFAULT_EMIT_GNU_HASH. * configure: Regenerate. * config.in: Regenerate. gold/ * configure.ac: Add --enable-default-hash-style option. * options.h (hash_style): Use DEFAULT_HASH_STYLE as default value. * configure: Regenerate. * config.in: Regenerate.
2017-08-08More support for ld --hash-style in the ld testsuiteAlan Modra11-9/+26
These were discovered when running --hash-style=gnu as default, the previous batch being --hash-style=both. * testsuite/ld-aarch64/ifunc-1-local.d: Run ld with --hash-style=sysv. * testsuite/ld-aarch64/ifunc-2-local.d: Likewise. * testsuite/ld-aarch64/ifunc-3a.d: Likewise. * testsuite/ld-frv/fdpic-pie-1.d: Likewise. * testsuite/ld-frv/fdpic-pie-2.d: Likewise. * testsuite/ld-frv/fdpic-pie-7.d: Likewise. * testsuite/ld-frv/fdpic-pie-8.d: Likewise. * testsuite/ld-arm/arm-elf.exp: Add --hash-style=sysv to "Using Thumb lib by another lib" test's ld options. * testsuite/ld-elf/note-3.l: Match .gnu.hash. * testsuite/ld-elf/note-3.t: Add .gnu.hash output section.
2017-08-07Move common symbol check after bed->common_definitionH.J. Lu2-8/+12
bfd/ * elflink.c (elf_link_add_object_symbols): Move common symbol check after bed->common_definition. ld/ * testsuite/ld-elf/pr21903.s (start): Removed. (_start): Likewise. (__start): Likewise. (main): Likewise. (bar): New.
2017-08-07Support different ld --hash-style in the ld testsuiteAlan Modra175-354/+603
When ld is running with something other than --hash-style=sysv by default, numerous tests need tweaking. Most of the changes just add --hash-style=sysv. I didn't want to make --hash-style=sysv global as that means --hash-style=gnu isn't well tested. * testsuite/ld-alpha/alpha.exp: Add --hash-style=sysv to various test's ld options. * testsuite/ld-arm/arm-elf.exp: Likewise. * testsuite/ld-elf/elf.exp: Likewise. * testsuite/ld-elf/readelf.exp: Likewise. * testsuite/ld-elfvsb/elfvsb.exp: Likewise. * testsuite/ld-i386/i386.exp: Likewise. * testsuite/ld-ia64/ia64.exp: Likewise. * testsuite/ld-m68k/m68k.exp: Likewise. * testsuite/ld-metag/metag.exp: Likewise. * testsuite/ld-powerpc/powerpc.exp: Likewise. * testsuite/ld-s390/s390.exp: Likewise. * testsuite/ld-sh/sh-vxworks.exp: Likewise. * testsuite/ld-shared/shared.exp: Likewise. * testsuite/ld-sparc/sparc.exp: Likewise. * testsuite/ld-tic6x/tic6x.exp: Likewise. * testsuite/ld-vax-elf/vax-elf.exp: Likewise. * testsuite/ld-x86-64/mpx.exp: Likewise. * testsuite/ld-x86-64/x86-64.exp: Likewise. * testsuite/ld-xtensa/xtensa.exp: Likewise. * testsuite/ld-elf/comm-data2.ld: Add .gnu.hash output section. * testsuite/ld-elf/pr20828-v.ld: Likewise. * testsuite/ld-elf/pr20828.ld: Likewise. * testsuite/ld-elf/pr21233.ld: Likewise. * testsuite/ld-elf/pr21384.ld: Likewise. * testsuite/ld-elf/provide-hidden-1.ld: Likewise. * testsuite/ld-elf/provide-hidden-2.ld: Likewise. * testsuite/ld-elf/provide-hidden-s.ld: Likewise. * testsuite/ld-scripts/cross1.t: Likewise. * testsuite/ld-elf/stab.d: Adjust allowed section indices. * testsuite/ld-i386/pie1.d: Don't match addresses. * testsuite/ld-i386/plt-pic2.dd: Likewise. * testsuite/ld-i386/pr19636-1d.d: Likewise. * testsuite/ld-i386/pr19636-2c.d: Likewise. * testsuite/ld-powerpc/elfv2so.d: Likewise. * testsuite/ld-powerpc/tlsopt5.d: Likewise. * testsuite/ld-powerpc/tlsopt5.wf: Likewise. * testsuite/ld-powerpc/tlsopt5_32.d: Likewise. * testsuite/ld-i386/pr19636-2b.d: Don't match _start. * testsuite/ld-powerpc/ambiguousv1.d: Relax symbol count, index and address match. * testsuite/ld-powerpc/ambiguousv1b.d: Likewise. * testsuite/ld-powerpc/ambiguousv2.d: Likewise. * testsuite/ld-powerpc/ambiguousv2b.d: Likewise. * testsuite/ld-aarch64/gc-plt-relocs.d: Run ld with --hash-style=sysv. * testsuite/ld-aarch64/ifunc-1.d: Likewise. * testsuite/ld-aarch64/ifunc-2.d: Likewise. * testsuite/ld-aarch64/ifunc-21.d: Likewise. * testsuite/ld-aarch64/relasz.d: Likewise. * testsuite/ld-aarch64/tls-small-ld.d: Likewise. * testsuite/ld-aarch64/tls-tiny-ld.d: Likewise. * testsuite/ld-arc/tls_gd-01.d: Likewise. * testsuite/ld-cris/libdso-10.d: Likewise. * testsuite/ld-cris/libdso-2.d: Likewise. * testsuite/ld-cris/pic-gc-72.d: Likewise. * testsuite/ld-cris/pic-gc-73.d: Likewise. * testsuite/ld-cris/tls-gd-1.d: Likewise. * testsuite/ld-cris/tls-gd-1h.d: Likewise. * testsuite/ld-cris/tls-gd-2.d: Likewise. * testsuite/ld-cris/tls-gd-2h.d: Likewise. * testsuite/ld-cris/tls-ie-10.d: Likewise. * testsuite/ld-cris/tls-ie-11.d: Likewise. * testsuite/ld-cris/tls-ie-8.d: Likewise. * testsuite/ld-cris/tls-ie-9.d: Likewise. * testsuite/ld-cris/tls-ld-4.d: Likewise. * testsuite/ld-cris/tls-ld-5.d: Likewise. * testsuite/ld-cris/tls-ld-6.d: Likewise. * testsuite/ld-cris/tls-ld-7.d: Likewise. * testsuite/ld-cris/tls-ldgd-14.d: Likewise. * testsuite/ld-cris/tls-ldgd-15.d: Likewise. * testsuite/ld-cris/tls-ldgdx-14.d: Likewise. * testsuite/ld-cris/tls-ldgdx-15.d: Likewise. * testsuite/ld-cris/tls-local-54.d: Likewise. * testsuite/ld-cris/tls-local-60.d: Likewise. * testsuite/ld-cris/tls-local-61.d: Likewise. * testsuite/ld-cris/weakhiddso.d: Likewise. * testsuite/ld-elf/linkinfo1a.d: Likewise. * testsuite/ld-elf/linkinfo1b.d: Likewise. * testsuite/ld-elf/pr19617a.d: Likewise. * testsuite/ld-elfvsb/hidden2.d: Likewise. * testsuite/ld-frv/fdpic-pie-6.d: Likewise. * testsuite/ld-frv/fdpic-shared-2.d: Likewise. * testsuite/ld-frv/fdpic-shared-5.d: Likewise. * testsuite/ld-frv/fdpic-shared-6.d: Likewise. * testsuite/ld-frv/fdpic-shared-8.d: Likewise. * testsuite/ld-frv/fdpic-shared-local-2.d: Likewise. * testsuite/ld-frv/fdpic-shared-local-8.d: Likewise. * testsuite/ld-frv/tls-dynamic-2.d: Likewise. * testsuite/ld-i386/ibt-plt-1.d: Likewise. * testsuite/ld-i386/ibt-plt-2a.d: Likewise. * testsuite/ld-i386/ibt-plt-2c.d: Likewise. * testsuite/ld-i386/ibt-plt-3a.d: Likewise. * testsuite/ld-i386/ibt-plt-3c.d: Likewise. * testsuite/ld-i386/pr20830.d: Likewise. * testsuite/ld-ia64/merge1.d: Likewise. * testsuite/ld-ia64/merge2.d: Likewise. * testsuite/ld-ia64/merge3.d: Likewise. * testsuite/ld-ia64/merge4.d: Likewise. * testsuite/ld-ia64/merge5.d: Likewise. * testsuite/ld-ifunc/ifunc-1-local-x86.d: Likewise. * testsuite/ld-ifunc/ifunc-1-x86.d: Likewise. * testsuite/ld-ifunc/ifunc-2-i386-now.d: Likewise. * testsuite/ld-ifunc/ifunc-2-local-i386-now.d: Likewise. * testsuite/ld-ifunc/ifunc-2-local-x86-64-now.d: Likewise. * testsuite/ld-ifunc/ifunc-2-local-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-2-x86-64-now.d: Likewise. * testsuite/ld-ifunc/ifunc-2-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-3a-x86.d: Likewise. * testsuite/ld-ifunc/pr17154-i386-now.d: Likewise. * testsuite/ld-ifunc/pr17154-i386.d: Likewise. * testsuite/ld-ifunc/pr17154-x86-64-now.d: Likewise. * testsuite/ld-ifunc/pr17154-x86-64.d: Likewise. * testsuite/ld-m68k/got-1.d: Likewise. * testsuite/ld-m68k/got-multigot-12-13-14-34-35-ok.d: Likewise. * testsuite/ld-m68k/got-multigot-14-ok.d: Likewise. * testsuite/ld-m68k/got-multigot-15-er.d: Likewise. * testsuite/ld-m68k/got-negative-12-13-14-34-ok.d: Likewise. * testsuite/ld-m68k/got-negative-12-13-14-35-er.d: Likewise. * testsuite/ld-m68k/got-negative-14-ok.d: Likewise. * testsuite/ld-m68k/got-negative-15-er.d: Likewise. * testsuite/ld-m68k/got-single-12-ok.d: Likewise. * testsuite/ld-m68k/got-single-13-er.d: Likewise. * testsuite/ld-m68k/got-xgot-12-13-14-15-34-35-ok.d: Likewise. * testsuite/ld-m68k/got-xgot-15-ok.d: Likewise. * testsuite/ld-m68k/tls-gd-1.d: Likewise. * testsuite/ld-m68k/tls-gd-2.d: Likewise. * testsuite/ld-m68k/tls-gd-ie-1.d: Likewise. * testsuite/ld-m68k/tls-ie-1.d: Likewise. * testsuite/ld-m68k/tls-ld-1.d: Likewise. * testsuite/ld-m68k/tls-ld-2.d: Likewise. * testsuite/ld-sh/shared-2.d: Likewise. * testsuite/ld-sh/tlsbin-2.d: Likewise. * testsuite/ld-sh/tlspic-2.d: Likewise. * testsuite/ld-x86-64/bnd-branch-1-now.d: Likewise. * testsuite/ld-x86-64/bnd-ifunc-1-now.d: Likewise. * testsuite/ld-x86-64/bnd-ifunc-1.d: Likewise. * testsuite/ld-x86-64/bnd-ifunc-2-now.d: Likewise. * testsuite/ld-x86-64/bnd-ifunc-2.d: Likewise. * testsuite/ld-x86-64/bnd-plt-1-now.d: Likewise. * testsuite/ld-x86-64/bnd-plt-1.d: Likewise. * testsuite/ld-x86-64/ibt-plt-1-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-1.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2a-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2a.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2c-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2c.d: Likewise. * testsuite/ld-x86-64/ibt-plt-3a-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-3a.d: Likewise. * testsuite/ld-x86-64/ibt-plt-3c-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-3c.d: Likewise. * testsuite/ld-x86-64/ilp32-4-nacl.d: Likewise. * testsuite/ld-x86-64/ilp32-4.d: Likewise. * testsuite/ld-x86-64/load1c-nacl.d: Likewise. * testsuite/ld-x86-64/load1c.d: Likewise. * testsuite/ld-x86-64/load1d-nacl.d: Likewise. * testsuite/ld-x86-64/load1d.d: Likewise. * testsuite/ld-x86-64/pie3-nacl.d: Likewise. * testsuite/ld-x86-64/pie3.d: Likewise. * testsuite/ld-x86-64/pr14207.d: Likewise. * testsuite/ld-x86-64/pr19162.d: Likewise. * testsuite/ld-x86-64/pr19636-2d-nacl.d: Likewise. * testsuite/ld-x86-64/pr19636-2d.d: Likewise. * testsuite/ld-x86-64/pr20253-1d.d: Likewise. * testsuite/ld-x86-64/pr20253-1f.d: Likewise. * testsuite/ld-x86-64/pr20253-1j.d: Likewise. * testsuite/ld-x86-64/pr20253-1l.d: Likewise. * testsuite/ld-x86-64/pr20830a-now.d: Likewise. * testsuite/ld-x86-64/pr20830a.d: Likewise. * testsuite/ld-x86-64/pr20830b-now.d: Likewise. * testsuite/ld-x86-64/pr20830b.d: Likewise. * testsuite/ld-x86-64/pr21038a-now.d: Likewise. * testsuite/ld-x86-64/pr21038a.d: Likewise. * testsuite/ld-x86-64/pr21038b-now.d: Likewise. * testsuite/ld-x86-64/pr21038b.d: Likewise. * testsuite/ld-x86-64/pr21038c-now.d: Likewise. * testsuite/ld-x86-64/pr21038c.d: Likewise.
2017-08-06Treat common symbol as undefined for --no-define-commonH.J. Lu12-6/+63
When --no-define-common is used to build shared library, treat common symbol as undefined so that common symbols that are referenced from a shared library to be assigned addresses only in the main program. This eliminates the unused duplicate space in the shared library, and also prevents any possible confusion over resolving to the wrong duplicate when there are many dynamic modules with specialized search paths for runtime symbol resolution. --no-define-common is only allowed when building a shared library. bfd/ PR ld/21903: * elflink.c (elf_link_add_object_symbols): Treat common symbol as undefined for --no-define-common. include/ PR ld/21903: * bfdlink.h (bfd_link_info): Add inhibit_common_definition. ld/ PR ld/21903: * ld.h (command_line): Remove inhibit_common_definition. * ldgram.y: Replace command_line.inhibit_common_definition with link_info.inhibit_common_definition. * ldlang.c (lang_common): Likewise. * lexsup.c (parse_args): Likewise. * ldmain.c (main): Only allow --no-define-common with -shared. * testsuite/ld-elf/pr21903.s: New file. * testsuite/ld-elf/pr21903a.d: Likewise. * testsuite/ld-elf/pr21903b.d: Likewise. * testsuite/ld-elf/pr21903c.d: Likewise. * testsuite/ld-elf/pr21903d.d: Likewise. * testsuite/ld-elf/pr21903e.d: Likewise.
2017-08-05Don't fail in elf32_hppa_set_gpAlan Modra2-1/+5
The base bfd_link_hash_table works fine here, the only thing to watch out for is to only set elf_gp if the output is ELF. bfd/ * elf32-hppa.c (elf32_hppa_set_gp): Don't require an hppa_link_hash_table. ld/ * testsuite/ld-unique/pr21529.d: Don't xfail hppa.
2017-08-04Add a testcase for "ld -d"H.J. Lu3-0/+17
"ld -d" assigns space to common symbols even if a relocatable output file is specified (with '-r'). PR ld/21904 * testsuite/ld-elf/pr21904.d: New file. * testsuite/ld-elf/pr21904.s: Likewise.
2017-08-03Add more targets to the list of architectures not supporting format changing ↵Nick Clifton5-19/+67
during linking. Fix seg-faults triggered when this is attempted. PR ld/21884 * testsuite/ld-elf/pr21884.d: Add AVR, HPPA, IA64, M68HC1x and SCORE to list of targets not supporting file format changes during linking. * testsuite/ld-unique/pr21529.d: Likewise. * emultempl/avrelf.em (_before_allocation): Skip for non-ELF output formats. (avr_elf_create_output_section_statements): Fail if the output format is not ELF. (avr_finish): Do not access the ELF header in non-ELF format output bfds. * emultempl/m68hc1xelf.em (_before_allocation): Skip for non-ELF output formats. (m68hc11elf_create_output_section_statements): Fail if the putput format is not ELF. (m68hc11elf_after_allocation): Skip for non-ELF output formats.
2017-08-03ELF checks for orphan placementAlan Modra2-29/+55
The loop checking for previous orphan placement should run even when the output is non-ELF. PR ld/21884 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Revert last change. Rename iself to elfinput. Expand comments. Condition ELF checks on having both input and output ELF files. Extract.. (elf_orphan_compatible): ..this new function.
2017-08-02Check ELF section header only for ELF outputH.J. Lu6-1/+40
When placing an orphan input section, check ELF section header only for ELF output. PR ld/21884 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Check ELF section header only for ELF output. * testsuite/ld-elf/pr21884.d: New test. * testsuite/ld-elf/pr21884.t: Likewise. * testsuite/ld-elf/pr21884a.s: Likewise. * testsuite/ld-elf/pr21884b.s: Likewise.
2017-08-02Revert the last change to emultempl/elf32.emH.J. Lu2-2/+4
It will be replaced by a different fix. * emultempl/elf32.em (_place_orphan): Revert the last change.
2017-08-02Fix assertion failure for xtensa linker.Max Filippov2-1/+6
* emultempl/xtensaelf.em (xtensa_wild_group_interleave_callback): Only check for by_name sorting.
2017-08-02Fix seg-fault when trying to place non-ELF orphan sections.Nick Clifton2-0/+8
PR 21884 * emultempl/elf32.em (_place_orphan): Skip non-ELF binaries when looking for sections to merge.
2017-07-31PR 21847, PowerPC64 --plt-localentry againAlan Modra2-2/+9
This makes ld warn about --plt-localentry if a version of glibc without the necessary ld.so checks is detected, and revises the documentation. bfd/ * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry without ld.so checks. gold/ * powerpc.cc (Target_powerpc::scan_relocs): Warn on --plt-localentry without ld.so checks. ld/ * ld.texinfo (plt-localentry): Revise.
2017-07-29PR 21847, Don't default PowerPC64 to --plt-localentryAlan Modra2-0/+19
The big comment in ppc64_elf_tls_setup says why. I've also added some code to the bfd linker that catches the -lpthread -lc symbol differences and disable generation of optimized call stubs even when --plt-localentry is activated. Gold doesn't yet have that. PR 21847 bfd/ * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry. (ppc64_elf_merge_symbol): Set non_zero_localentry. (is_elfv2_localentry0): Test non_zero_localentry. (ppc64_elf_tls_setup): Default to --no-plt-localentry. gold/ * powerpc.cc (Target_powerpc::scan_relocs): Default to --no-plt-localentry. ld/ * ld.texinfo (plt-localentry): Document.
2017-07-28Make some improvements to how SORT_* specifiers and EXCLUDE_FILE specifiers ↵Andrew Burgess20-60/+244
are handled in the linker script grammar. * ldgram.y (ldgram_had_keep): Make static. (ldgram_vers_current_lang): Likewise. (filename_spec): New rule. (input_section_spec_no_keep): Use filename_spec. (wildcard_maybe_exclude): New rule. (wildcard_spec): Rename to... (section_name_spec): ...this. (section_NAME_list): Rename to... (section_name_list): ...this. (section_name_spec): Simplifiy and use wildcard_maybe_exclude. * ldlang.c (placed_commons): Delete. (lang_add_wild): No longer set placed_commons. (print_wild_statement): Use full names for SORT specifiers. * testsuite/ld-scripts/align.exp: Run new tests. * testsuite/ld-scripts/align3.d: New file. * testsuite/ld-scripts/align3.t: New file. * testsuite/ld-scripts/align4.d: New file. * testsuite/ld-scripts/align4.t: New file. * testsuite/ld-scripts/align5.d: New file. * testsuite/ld-scripts/align5.t: New file. * testsuite/ld-scripts/exclude-file-5.d: New file. * testsuite/ld-scripts/exclude-file-5.map: New file. * testsuite/ld-scripts/exclude-file-5.t: New file. * testsuite/ld-scripts/exclude-file-6.d: New file. * testsuite/ld-scripts/exclude-file-6.map: New file. * testsuite/ld-scripts/exclude-file-6.t: New file. * NEWS: Mention the changes.
2017-07-27Move AVR .promemx.* sections into higher memory.Georg-Johann Lay2-1/+9
PR ld/21849 * scripttempl/avr.sc: Split .progmemx.* from .progmem.* and locate former at a higher address.
2017-07-25__tls_get_addr_opt stub eh_frame infoAlan Modra5-3/+44
Since the __tls_get_addr_opt stub saves LR and makes a call, eh_frame info should be generated to describe how to unwind through the stub. The patch also changes the way the backend iterates over stubs, from looking at all sections in stub_bfd to which all dynamic sections are attached as well, to iterating over the group list, which gets just the stub sections. Most binaries will have just one or two stub groups, so this is a little faster. bfd/ * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl. (stub_eh_frame_size): New function. (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl. (group_sections): Init group tls_get_addr_opt_bctrl. (ppc64_elf_size_stubs): Update sizing and initialization of .eh_frame. Iteration over stubs via group list. (ppc64_elf_build_stubs): Iterate over stubs via group list. (ppc64_elf_finish_dynamic_sections): Update finalization of .eh_frame. ld/ * testsuite/ld-powerpc/tlsopt5.s: Add cfi. * testsuite/ld-powerpc/tlsopt5.d: Update. * testsuite/ld-powerpc/tlsopt5.wf: New file. * testsuite/ld-powerpc/powerpc.exp: Perform new tlsopt5 test.
2017-07-24[ARC] Fix big-endian ld tests errors.claziss4-5/+13
A set of small patches that are fixing big-endian observed errors. ld/ 2017-07-24 Claudiu Zissulescu <claziss@synopsys.com> * testsuite/ld-arc/jli-overflow.d: Force testing for little endian. * testsuite/ld-arc/tls_gd-01.d: Fix string to match bigendian systems. * testsuite/ld-arc/tls_ie-01.d: Fix test for bigendian systems.