[PATCH v3 6/7] ld: Add tests for -z nosectionheader and --strip-section-headers

Florian Weimer fweimer@redhat.com
Tue Jun 6 09:57:02 GMT 2023


* H. J. Lu via Binutils:

> Add tests to verify that the linker option, -z nosectionheader and
> objcopy and strip option, --strip-section-headers, work correctly as well
> as linker issues an error when dynamic symbol table from PT_DYNAMIC
> segment is used.
>
> 	PR ld/25617
> 	* testsuite/ld-elf/hash-2.d: New file.
> 	* testsuite/ld-elf/no-section-header.exp: Likewise.
> 	* testsuite/ld-elf/pr25617-1-no-sec-hdr.nd: Likewise.
> 	* testsuite/ld-elf/pr25617-1-no-sec-hdr.rd: Likewise.
> 	* testsuite/ld-elf/pr25617-1-static-no-sec-hdr.rd: Likewise.
> 	* testsuite/ld-elf/pr25617-1a-no-sec-hdr.nd: Likewise.
> 	* testsuite/ld-elf/pr25617-1a-no-sec-hdr.rd: Likewise.
> 	* testsuite/ld-elf/pr25617-1a-sec-hdr.rd: Likewise.
> 	* testsuite/ld-elf/pr25617-1a.c: Likewise.
> 	* testsuite/ld-elf/pr25617-1b.c: Likewise.
> 	* testsuite/ld-elf/start-noheader.rd: Likewise.
> 	* testsuite/ld-elf/start-shared-noheader-gnu.rd: Likewise.
> 	* testsuite/ld-elf/start-shared-noheader-sysv.rd: Likewise.
> 	* testsuite/ld-elf/start-shared-noheader.nd: Likewise.

Should this have a test that -r with -z nosectionheader is an error?

Thanks,
Florian



More information about the Binutils mailing list