aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-shared
AgeCommit message (Collapse)AuthorFilesLines
2004-05-11bfd/Jakub Jelinek1-0/+1
* elflink.c (elf_bfd_final_link): Don't output STT_SECTION symbol into .dynsym if elf_section_data (sec)->dynindx <= 0. Adjust counting of last_local. (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt created by the linker nor !SHF_ALLOC. * elf32-i386.c (elf_i386_finish_dynamic_sections): Point DT_PLTGOT to the start of the .got.plt section instead of the .got output section. Set sh_entsize for .got section in addition to .got.plt. (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_ is at sgot->output_section->vma. * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point DT_PLTGOT to the start of the .got.plt section instead of the .got output section. (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_ is at sgot->output_section->vma. Set sh_entsize for .got section in addition to .got.plt. * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO. (bfd_section_from_phdr): Likewise. (map_sections_to_segments): Likewise. (assign_file_positions_for_segments): Likewise. (get_program_header_size): Likewise. * elflink.c (bfd_elf_size_dynamic_sections): Set elf_tdata (output_bfd)->relro from info->relro. * elf-bfd.h (struct elf_obj_tdata): Add relro field. include/ * bfdlink.h (struct bfd_link_info): Add relro, relro_start and relro_end fields. * elf/common.h (PT_GNU_EH_FRAME, PT_GNU_STACK): Add comments. (PT_GNU_RELRO): Define. binutils/ * readelf.c (get_segment_type): Handle PT_GNU_RELRO. ld/ * genscripts.sh: Generate -z combreloc -z now -z relro scripts for binaries, -shared and -pie. * emulparams/elf_i386.sh (SEPARATE_GOTPLT): Set. * emulparams/elf_x86_64.sh (SEPARATE_GOTPLT): Set. * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Rename to... (OTHER_RELRO_SECTIONS): ... this. * ldlex.l (DATA_SEGMENT_RELRO_END): Add. * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Handle -z relro and -z norelro. (gld${EMULATION_NAME}_list_options): Add it to usage. (gld${EMULATION_NAME}_get_script): Return -z combreloc -z now -z relro scripts when appropriate. * scripttempl/elf.sc: Unset SEPARATE_GOTPLT if RELRO_NOW is set. Create separate .got.plt section if SEPARATE_GOTPLT. Move sections which are only written during relocation handling to the beginning of RW segment. If NO_SMALL_DATA, move .got before .data. Add DATA_SEGMENT_RELRO_END directive. Include OTHER_RELRO_SECTIONS. * ldgram.y (DATA_SEGMENT_RELRO_END): Add. * ldexp.c (exp_print_token): Handle DATA_SEGMENT_RELRO_END. (fold_unary): Likewise. (fold_binary): Handle -z relro. * ldexp.h (struct exp_data_seg): Add exp_dataseg_relro_seen and exp_dataseg_relro_adjust phases. Add relro_end field. * ldmain.c (main): Initialize link_info.relro to FALSE. * ldlang.c (lang_size_sections): Handle -z relro. ld/testsuite/ * ld-i386/tlspic.rd: Adjust for section reordering changes and removal of unneeded STT_SECTION symbols from .dynsym. * ld-i386/tlspic.dd: Likewise. * ld-i386/tlspic.sd: Likewise. * ld-i386/tlsbin.rd: Likewise. * ld-i386/tlsbinpic.s: Likewise. * ld-i386/tlsbin.dd: Likewise. * ld-i386/tlsbin.sd: Likewise. * ld-i386/tlsnopic.rd: Likewise. * ld-i386/tlsnopic1.s: Likewise. * ld-i386/combreloc.d: Likewise. * ld-i386/tlsnopic.dd: Likewise. * ld-i386/tlsnopic.sd: Likewise. * ld-x86-64/tlspic.rd: Likewise. * ld-x86-64/tlspic.dd: Likewise. * ld-x86-64/tlsbin.dd: Likewise. * ld-x86-64/tlspic.sd: Likewise. * ld-x86-64/tlsbin.sd: Likewise. * ld-x86-64/tlspic.td: Likewise. * ld-x86-64/tlsbin.td: Likewise. * ld-x86-64/tlsbin.rd: Likewise. * ld-s390/tlspic1.s: Likewise. * ld-s390/tlsbinpic.s: Likewise. * ld-s390/tlspic.rd: Likewise. * ld-s390/tlsbin.rd: Likewise. * ld-s390/tlspic.dd: Likewise. * ld-s390/tlsbin.dd: Likewise. * ld-s390/tlsbin.sd: Likewise. * ld-s390/tlsbin.td: Likewise. * ld-s390/tlspic.sd: Likewise. * ld-s390/tlspic.td: Likewise. * ld-s390/tlspic1_64.s: Likewise. * ld-s390/tlsbinpic_64.s: Likewise. * ld-s390/tlspic_64.rd: Likewise. * ld-s390/tlsbin_64.rd: Likewise. * ld-s390/tlspic_64.dd: Likewise. * ld-s390/tlsbin_64.dd: Likewise. * ld-s390/tlspic_64.sd: Likewise. * ld-s390/tlspic_64.td: Likewise. * ld-s390/tlsbin_64.td: Likewise. * ld-s390/tlsbin_64.sd: Likewise. * ld-powerpc/tlsexe32.r: Likewise. * ld-powerpc/tlsso32.r: Likewise. * ld-powerpc/tlsso32.d: Likewise. * ld-powerpc/tlsso32.g: Likewise. * ld-powerpc/tlsso32.t: Likewise. * ld-powerpc/tlsexe.r: Likewise. * ld-powerpc/tlsso.r: Likewise. * ld-powerpc/tlsso.g: Likewise. * ld-powerpc/tlsexetoc.r: Likewise. * ld-powerpc/tlstocso.r: Likewise. * ld-powerpc/tlstocso.g: Likewise. * ld-ia64/tlspic.rd: Likewise. * ld-ia64/tlspic.dd: Likewise. * ld-ia64/tlspic.sd: Likewise. * ld-ia64/tlspic.td: Likewise. * ld-ia64/tlsbin.rd: Likewise. * ld-ia64/tlsbin.sd: Likewise. * ld-ia64/tlsbin.td: Likewise. * ld-elfvsb/elfvsb.exp: XFAIL non-PIC load offset tests on s390x. * ld-shared/shared.exp: Likewise.
2004-04-19bfd/Jakub Jelinek1-0/+9
* elf32-sparc.c (elf32_sparc_relocate_section): Handle relocs against hidden/protected undefweak symbols properly. * elf64-sparc.c (sparc64_elf_relocate_section): Likewise. gas/testsuite/ * gas/cfi/cfi-sparc64-1.d: Update. ld/testsuite/ * ld-elfvsb/elfvsb.exp: XFAIL some tests on sparc64. * ld-shared/shared.exp: Likewise.
2003-10-07 * configure.host (HOSTING_LIBS): Define for hppa*-*-linux*.Dave Anglin1-0/+9
* ld-elfvsb/elfvsb.exp: xfail non-pic shared library tests for non 64-bit hppa*-*-linux* targets. * ld-elfvsb/main.c (main_visibility_check): Cast value returned by visibility_funptr () to a function pointer. * ld-shared/shared.exp: xfail shared (non PIC), shared (non PIC, load offset), and shared (PIC main, non PIC so) tests for non 64-bit hppa*-*-linux* targets.
2003-05-162003-05-15 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu1-3/+3
* config/default.exp (gcc_ld_flag): New. Make the newly built linker available to gcc. * lib/ld-lib.exp (default_ld_simple_link): Pass $gcc_ld_flag to gcc. * ld-elfvers/vers.exp: Use "ld_simple_link $CC" to build shared libraries. * ld-elfvsb/elfvsb.exp: Likewise. * ld-elfweak/elfweak.exp: Likewise. * ld-shared/shared.exp: Likewise. * ld-elfvers/vers.exp: Use "-Wl,-rpath,." to build shared libraries. * ld-elfvsb/elfvsb.exp: Likewise. * ld-elfvsb/elfvsb.exp: Remove xfail for powerpc-*-linux*. * ld-elfweak/elfweak.exp: Use PIC for shared libraries.
2003-05-09 * ld-elfvsb/elf-offset.ld: Add .rel.eh_frame and .rela.eh_frameMartin Schwidefsky2-0/+4
to linker script. * ld-elfvsb/elfvsb.exp (visibility_run): Add setup_xfails for s390x. * ld-selective/selective.exp: Disable for s390 and s390x. * ld-shared/elf-offset.ld: Add .rel.eh_frame and .rela.eh_frame to linker script. * ld-shared/shared.exp (shared_test): Add setup_xfails for s390x. * ld-undefined/undefined.exp (checkund): Remove setup_xfail for s390x.
2003-02-13bfd/Jakub Jelinek1-2/+7
* elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO. ld/testsuite/ * ld-shared/shared.exp: Run on s390*-*-linux* and x86_64-*-linux* too. xfail tests linking non-pic code into shared libs on x86_64-*-linux*. * ld-elfvsb/elfvsb.exp: Likewise. * ld-elfvers/vers.exp: Likewise. Add vers24a, vers24b and vers24c tests. * ld-elfvers/vers3.ver: Allow VERS_2.0 to come before GLIBC_* version. * ld-elfvers/vers19.ver: Likewise. * ld-elfvers/vers24a.c: New test. * ld-elfvers/vers24b.c: New test. * ld-elfvers/vers24c.c: New test. * ld-elfvers/vers24.map: New test. * ld-elfvers/vers24.rd: New test. * lib/ld-lib.exp (run_ld_link_tests): Add optional 7th argument cflags. If source files have .c extension, compile them first.
2002-07-30 * ld-discard/discard.exp, ld-scripts/phdrs.exp, ld-scripts/phdrs2.exp,Alan Modra1-1/+3
ld-selective/sel-dump.exp: Test hppa*64*-*-hpux* target. * ld-elfvers/vers.exp, ld-elfvsb/elfvsb.exp, ld-elfweak/elfweak.exp, ld-linkonce/linkonce.exp, ld-shared/shared.exp, ld-undefined/weak-undef.exp: Test hppa*64*-*-hpux* and hppa*-*-linux* targets. * ld-discard/exit.s, ld-discard/extern.s, ld-discard/start.s, ld-discard/static.s: Add whitespace before assembler directives.
2002-04-19 * ld-elfvsb/elfvsb.exp: Mirror ia64 non-pic xfails for alpha.Richard Henderson1-0/+3
* ld-shared/shared.exp: Likewise. * ld-selective/selective.exp: Disable for alpha. * ld-undefined/undefined.exp: Add alpha to dwarf2 xfails.
2001-06-062001-06-06 H.J. Lu <hjl@gnu.org>H.J. Lu3-4/+6
* ld-bootstrap/bootstrap.exp: Rebuild tmpdir/ld2 with tmpdir/ld3 on Linux/mips. * ld-elfvers/vers.exp: Also run on istarget Linux/mips. * ld-elfvsb/elfvsb.exp: Likewise. * ld-shared/shared.exp: Likewise. * ld-selective/selective.exp: Mark selective2, selective3, selective4 and selective5 xfail on Linux/mips. * ld-shared/main.c: Skip invalid -Bsymbolic tests on Linux/mips. * symbolic.dat: Remove invalid -Bsymbolic tests on Linux/mips. * ld-srec/srec.exp: Add Linux/mips to xfail.
2001-04-292001-04-29 H.J. Lu <hjl@gnu.org>H.J. Lu2-0/+15
* ld-shared/symbolic.dat: New. * ld-shared/shared.exp: Also check -Bsymbolic.
2001-03-13Fixtypos in ChangeLogs, fix copyright dates in filesNick Clifton1-1/+2
2001-02-152001-02-14 H.J. Lu <hjl@gnu.org>H.J. Lu1-12/+9
* ld-bootstrap/bootstrap.exp: Rebuild tmpdir/ld2 with tmpdir/ld3 for -static on ia64. * ld-checks/checks.exp: Don't run on ia64-*-elf* nor ia64-*-linux*. * ld-elfvers/vers.exp: Also run ia64-*-elf* and ia64-*-linux*. * ld-elfvsb/elfvsb.exp: Use i?86-*-*. Also run on ia64-*-linux*. Set up expected failures for ia64-*-linux*. * ld-shared/shared.exp: Likewise.
2001-01-032001-01-03 Philip Blundell <pb@futuretv.com>Phil Blundell1-0/+1
* ld-elfvsb/elfvsb.exp: Run test on Linux/Alpha. * ld-shared/shared.exp: Likewise.
2001-01-012001-01-01 Philip Blundell <philb@gnu.org>Phil Blundell1-1/+2
* ld-elfvers/vers.exp: Run test on Linux/ARM. * ld-elfvsb/elfvsb.exp: Likewise. * ld-shared/shared.exp: Likewise.
2000-10-192000-10-19 H.J. Lu (hjl@gnu.org)H.J. Lu1-0/+1
* ld-elfvsb/elfvsb.exp (visibility_run): Set expected failures for Linux/PPC. * ld-shared/shared.exp: Likewise.
1999-09-18Support 8 and 16-bit relocs for i386coff. Enable i386 gas testsuite testsAlan Modra1-0/+1
previously disabled for lack of such support. For *-*-linux*libc1 targets, XFAIL a ld testsuite that fails due to a bug in the dynamic linker prior to glibc-2.1.
1999-08-091999-08-09 Jakub Jelinek <jj@ultra.linux.cz>Ian Lance Taylor1-0/+1
* ld-elfvers/vers.exp: Run tests on sparc*-*-linux*. * ld-shared/shared.exp: Likewise.
1999-07-221999-07-21 H.J. Lu <hjl@gnu.org>Ian Lance Taylor1-0/+1
* ld-elfvers/vers1.c: Add missing prototypes and include <stdio.h> if necessary. * ld-elfvers/vers15.c: Likewise. * ld-elfvers/vers19.c: Likewise. * ld-elfvers/vers2.c: Likewise. * ld-elfvers/vers3.c: Likewise. * ld-elfvers/vers4.c: Likewise. * ld-elfvers/vers6.c: Likewise. * ld-elfvers/vers7.c: Likewise. * ld-elfvers/vers9.c: Likewise. * ld-shared/main.c: Likewise. * ld-srec/sr3.cc (Foo::Foo): Remove arg name.
1999-06-12 * ld-scripts/phdrs.exp: Change target check from "*-*-linuxaout*"Ian Lance Taylor1-7/+2
to "*-*-linux*aout*". * ld-scripts/weak.exp: Likewise. * ld-shared/shared.exp: Likewise. Simplify condition a bit.
1999-06-09 * ld-cdtest/cdtest-main.cc: Avoid `implicit int' warning.Andreas Schwab1-1/+1
* ld-shared/sh1.c: Fix typo.
1999-05-0319990502 sourceware importbinu_ss_19990502Richard Henderson8-0/+735