Summary: | Make -z relro the default if possible | ||
---|---|---|---|
Product: | binutils | Reporter: | H.J. Lu <hjl.tools> |
Component: | ld | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 2.27 | ||
Target Milestone: | 2.27 | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
H.J. Lu
2016-06-21 13:27:09 UTC
arc-linux-uclibc has only one failure: FAIL: Common symbol override test (In reply to H.J. Lu from comment #1) > arc-linux-uclibc has only one failure: > > FAIL: Common symbol override test It is triggered by commit fc3eec7ebd155d31c1a58e6446cc231ddb6e361b Author: Claudiu Zissulescu <claziss@synopsys.com> Date: Thu May 19 14:51:53 2016 +0200 [ARC] Fixed-linker-related-testsuite-for-ARC ld/ 2016-05-19 Cupertino Miranda <cmiranda@synopsys.com> * testsuite/ld-elf/compressed1d.d: Removed from notarget. * testsuite/ld-elf/group8a.d: Likewise. * testsuite/ld-elf/group8b.d: Likewise. * testsuite/ld-elf/group9a.d: Likewise. * testsuite/ld-elf/group9b.d: Likewise. * testsuite/ld-elf/pr12851.d: Likewise. * testsuite/ld-elf/pr12975.d: Likewise. * testsuite/ld-elf/pr13177.d: Likewise. * testsuite/ld-elf/pr13195.d: Likewise. * testsuite/ld-elf/pr17615.d: Likewise. * testsuite/ld-elf/eh-frame-hdr.d: Removed from xfail. * testsuite/ld-elf/group3b.d: Likewise. * testsuite/ld-srec/srec.exp: Likewise. * testsuite/lib/ld-lib.exp (check_gc_sections_available): Mark ARC as supporting gc. (check_shared_lib_support): Mark ARC as supporting. It (In reply to H.J. Lu from comment #0) > Since "-z relro" makes more pages read-only after relocation, I'd > like to make it the default if possible. The following ELF targets > don't support "-z relro": > > check.arc-linux-uclibc:FAIL: strip -z relro -shared (relro1) > check.arc-linux-uclibc:FAIL: objcopy -z relro -shared (relro1) > check.arc-linux-uclibc:FAIL: objcopy -z relro (tdata1) > check.arc-linux-uclibc:FAIL: objcopy -shared -z relro (tdata1) > check.arc-linux-uclibc:FAIL: objcopy -z relro (tdata2) > check.arc-linux-uclibc:FAIL: objcopy -shared -z relro (tdata2) > check.arc-linux-uclibc:FAIL: objcopy -z relro (tdata3) > check.arc-linux-uclibc:FAIL: objcopy -shared -z relro (tdata3) > check.arc-linux-uclibc:FAIL: objcopy -shared -z relro (tbss1) > check.arc-linux-uclibc:FAIL: objcopy -shared -z relro (tbss2) > check.arc-linux-uclibc:FAIL: objcopy -shared -z relro (tbss3) arc-linux-uclibc is fixed by commit c0913ebfafa2c3b94e08856c3304037fa9f0906e Author: Claudiu Zissulescu <claziss@synopsys.com> Date: Thu May 19 14:44:01 2016 +0200 [ARC] Emulation and default script template changes. 2016-05-19 Cupertino Miranda <cmiranda@synopsys.com> * emulparams/arcelf.sh: Changed. * emulparams/arclinux.sh: Likewise. * scripttempl/arclinux.sc: Moved to a more standard implementation similar to elf.sc. The master branch has been updated by H.J. Lu <hjl@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=647e4d46495f2bfb0950fd1066c8a660173cca40 commit 647e4d46495f2bfb0950fd1066c8a660173cca40 Author: H.J. Lu <hjl.tools@gmail.com> Date: Wed Jun 22 05:37:24 2016 -0700 ld: Add a linker configure option --enable-relro Add a configure option --enable-relro to decide whether -z relro should be enabled in ELF linker by default. Default to yes for all Linux targets, except FRV, HPPA, IA64 and MIPS, since many relro tests fail on these targets. PR ld/20283 * NEWS: Mention --enable-relro. * configure.ac: Add --enable-relro. (DEFAULT_LD_Z_RELRO): New. Set by --enable-relro. * configure.tgt (ac_default_ld_z_relro): Default it to 1 for some Linux targets. * config.in: Regenerated. * configure: Likewise. * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set link_info.relro to DEFAULT_LD_Z_RELRO. * testsuite/config/default.exp (ld_elf_shared_opt): New. * testsuite/lib/ld-lib.exp (run_dump_test): Pass $ld_elf_shared_opt to ld for ELF targets with shared object support. (run_ld_link_tests): Likewise. The master branch has been updated by H.J. Lu <hjl@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6b1edb94fedc7103b4929354d27304d0bd756f49 commit 6b1edb94fedc7103b4929354d27304d0bd756f49 Author: H.J. Lu <hjl.tools@gmail.com> Date: Wed Jun 22 05:39:22 2016 -0700 gold: Add a linker configure option --enable-relro Add a configure option --enable-relro to decide whether -z relro should be enabled by default. Default to yes. PR ld/20283 * NEWS: Mention --enable-relro. * configure.ac: Add --enable-relro. (DEFAULT_LD_Z_RELRO): New. Set by --enable-relro and default to 1. * config.in: Regenerated. * configure: Likewise. * options.h (General_options::relro): Default to DEFAULT_LD_Z_RELRO. Fixed. |