diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-11-09 14:14:08 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2018-01-09 09:05:25 -0800 |
commit | 972d6cb518582722cb6162dd76b0486673dcdd55 (patch) | |
tree | e5c6b9f22c5990a1a9c0924d7aefe6b34f879a6a /zlib/crc32.h | |
parent | 91d8b670661883fc0472fd05cf0e54d0e357c187 (diff) | |
download | gdb-972d6cb518582722cb6162dd76b0486673dcdd55.zip gdb-972d6cb518582722cb6162dd76b0486673dcdd55.tar.gz gdb-972d6cb518582722cb6162dd76b0486673dcdd55.tar.bz2 |
ld: Add "-z separate-code" option to ELF linker
Code-only LOAD segment has the same requirement for segment alignment
and page sizes as GNU_RELRO segment. But for GNU_RELRO segment, the
segment may not end at the same address of the end of data segment. But
for code-only LOAD segment, it is exactly the same as code LOAD segment.
The new "-z separate-code" option will turn on both separate code read-only
data LOAD segments and GNU_RELRO segment. The new "-z noseparate-code"
option will turn off only separate code and read-only data LOAD segments.
"-z relro" is updated not to turn off separate code and read-only data
LOAD segments. "-z norelro" is updated to turn off both GNU_RELRO segment
as well as separate code and read-only data LOAD segments.
include/
PR ld/22393
* bfdlink.h (bfd_link_info): Change the relro field to 2 bits.
ld/
PR ld/22393
* NEWS: Mention "-z separate-code".
* emultempl/elf32.em (gld${EMULATION_NAME}_get_script): Get
builtin linker scripts and return linker scripts from disk for
"-z separate-code".
(gld${EMULATION_NAME}_handle_option): Set the first bit of
link_info.relro for "-z relro". Clear link_info.relro for
"-z norelro". Set link_info.relro to 2 for "-z separate-code".
Keep only the first bit of link_info.relro for "notextonly".
* genscripts.sh: Generate linker scripts for "-z separate-code".
(LD_FLAG): Set to *textonly for "-z separate-code".
* lexsup.c (elf_shlib_list_options): Update linker help messsages
for "-z relro" and "-z norelro". Add linker help messsages for
"-z separate-code" and "-z noseparate-code".
* ld.texinfo: Update "-z norelro". Document "-z separate-code".
Diffstat (limited to 'zlib/crc32.h')
0 files changed, 0 insertions, 0 deletions