diff options
author | Cary Coutant <ccoutant@gmail.com> | 2020-12-14 15:46:47 -0800 |
---|---|---|
committer | Cary Coutant <ccoutant@gmail.com> | 2020-12-14 15:49:27 -0800 |
commit | ff4bc37d77a0ca7286883a477adcb3aa145fc782 (patch) | |
tree | f90757858598811f287e2100b14fa0299d39cdde /gold/testsuite/Makefile.am | |
parent | 8cd6d968de17f5dac1601d7cbdda838c9d82c822 (diff) | |
download | gdb-ff4bc37d77a0ca7286883a477adcb3aa145fc782.zip gdb-ff4bc37d77a0ca7286883a477adcb3aa145fc782.tar.gz gdb-ff4bc37d77a0ca7286883a477adcb3aa145fc782.tar.bz2 |
Keep input SHF_GNU_RETAIN sections and strip output SHF_GNU_RETAIN for GNU/FreBSD ELFOSABIs.
2020-12-14 H.J. Lu <hjl.tools@gmail.com>
Cary Coutant <ccoutant@gmail.com>
elfcpp/
PR gold/27039
* elfcpp.h (SHF): Add SHF_GNU_RETAIN.
gold/
PR gold/27039
* layout.cc (Layout::layout): Strip SHF_GNU_RETAIN.
* object.cc (Sized_relobj_file::Sized_relobj_file): Initialize osabi_.
(Sized_relobj_file::do_layout): Keep SHF_GNU_RETAIN sections for
GNU/FreBSD ELFOSABIs.
* object.h (Osabi) New class.
(Sized_relobj_file): Add osabi() and osabi_.
* testsuite/Makefile.am (check_SCRIPTS): Add retain.sh.
(check_DATA): Add retain_1.out retain_2.out.
(MOSTLYCLEANFILES): Add retain_1 retain_2.
(retain_1.out): New target.
(retain_1): Likewise.
(retain_1.o): Likewise.
(retain_2.out): Likewise.
(retain_2): Likewise.
(retain_2.o): Likewise.
* testsuite/Makefile.in: Regenerate.
* testsuite/retain.sh: New file.
* testsuite/retain_1.s: Likewise.
* testsuite/retain_2.s: Likewise.
Diffstat (limited to 'gold/testsuite/Makefile.am')
-rw-r--r-- | gold/testsuite/Makefile.am | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am index 72a296f..38e5481 100644 --- a/gold/testsuite/Makefile.am +++ b/gold/testsuite/Makefile.am @@ -4418,4 +4418,20 @@ pr26936c.o: pr26936c.s pr26936d.o: pr26936d.s $(TEST_AS) --gen-debug -mx86-used-note=yes -o $@ $< +check_SCRIPTS += retain.sh +check_DATA += retain_1.out retain_2.out +MOSTLYCLEANFILES += retain_1 retain_2 +retain_1.out: retain_1 + $(TEST_NM) $< >$@ +retain_1: retain_1.o ../ld-new + ../ld-new -e _start --gc-sections -o $@ retain_1.o +retain_1.o: retain_1.s + $(TEST_AS) -o $@ $< +retain_2.out: retain_2 + $(TEST_READELF) -d $< >$@ +retain_2: retain_2.o ../ld-new + ../ld-new -pie -e _start --gc-sections -o $@ retain_2.o +retain_2.o: retain_2.s + $(TEST_AS) -o $@ $< + endif DEFAULT_TARGET_X86_64 |