Add support for disabling automatic generation of .eh_frame_hdr sections in ELF based linkers.
PR ld/20537 * emultempl/elf32.em: More OPTION_xxx values into an enum. Add OPTION_NO_EH_FRAME_HDR. (_add_options): Add support for --no-eh-frame-hdr. * ld.texinfo: Document new option. * lexsup.c (elf_shlib_list_options): List new option. * NEWS: Mention the new option.
This commit is contained in:
parent
d68ff01f17
commit
29063f8bfb
10
ld/ChangeLog
10
ld/ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
2016-09-14 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
PR ld/20537
|
||||||
|
* emultempl/elf32.em: More OPTION_xxx values into an enum. Add
|
||||||
|
OPTION_NO_EH_FRAME_HDR.
|
||||||
|
(_add_options): Add support for --no-eh-frame-hdr.
|
||||||
|
* ld.texinfo: Document new option.
|
||||||
|
* lexsup.c (elf_shlib_list_options): List new option.
|
||||||
|
* NEWS: Mention the new option.
|
||||||
|
|
||||||
2016-09-06 H.J. Lu <hongjiu.lu@intel.com>
|
2016-09-06 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
PR ld/20550
|
PR ld/20550
|
||||||
|
3
ld/NEWS
3
ld/NEWS
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
Changes in 2.28:
|
Changes in 2.28:
|
||||||
|
|
||||||
|
* The command line option --no-eh-frame-hdr can now be used in ELF based
|
||||||
|
linkers to disable the automatic generation of .eh_frame_hdr sections.
|
||||||
|
|
||||||
* Add --in-implib=<infile> to the ARM linker to enable specifying a set of
|
* Add --in-implib=<infile> to the ARM linker to enable specifying a set of
|
||||||
Secure Gateway veneers that must exist in the output import library specified
|
Secure Gateway veneers that must exist in the output import library specified
|
||||||
by --out-implib=<outfile> and the address they must have. As such,
|
by --out-implib=<outfile> and the address they must have. As such,
|
||||||
|
@ -2199,15 +2199,19 @@ fi
|
|||||||
|
|
||||||
fragment <<EOF
|
fragment <<EOF
|
||||||
|
|
||||||
#define OPTION_DISABLE_NEW_DTAGS (400)
|
enum elf_options
|
||||||
#define OPTION_ENABLE_NEW_DTAGS (OPTION_DISABLE_NEW_DTAGS + 1)
|
{
|
||||||
#define OPTION_GROUP (OPTION_ENABLE_NEW_DTAGS + 1)
|
OPTION_DISABLE_NEW_DTAGS = 400,
|
||||||
#define OPTION_EH_FRAME_HDR (OPTION_GROUP + 1)
|
OPTION_ENABLE_NEW_DTAGS,
|
||||||
#define OPTION_EXCLUDE_LIBS (OPTION_EH_FRAME_HDR + 1)
|
OPTION_GROUP,
|
||||||
#define OPTION_HASH_STYLE (OPTION_EXCLUDE_LIBS + 1)
|
OPTION_EH_FRAME_HDR,
|
||||||
#define OPTION_BUILD_ID (OPTION_HASH_STYLE + 1)
|
OPTION_NO_EH_FRAME_HDR,
|
||||||
#define OPTION_AUDIT (OPTION_BUILD_ID + 1)
|
OPTION_EXCLUDE_LIBS,
|
||||||
#define OPTION_COMPRESS_DEBUG (OPTION_AUDIT + 1)
|
OPTION_HASH_STYLE,
|
||||||
|
OPTION_BUILD_ID,
|
||||||
|
OPTION_AUDIT,
|
||||||
|
OPTION_COMPRESS_DEBUG
|
||||||
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gld${EMULATION_NAME}_add_options
|
gld${EMULATION_NAME}_add_options
|
||||||
@ -2243,6 +2247,7 @@ fragment <<EOF
|
|||||||
{"disable-new-dtags", no_argument, NULL, OPTION_DISABLE_NEW_DTAGS},
|
{"disable-new-dtags", no_argument, NULL, OPTION_DISABLE_NEW_DTAGS},
|
||||||
{"enable-new-dtags", no_argument, NULL, OPTION_ENABLE_NEW_DTAGS},
|
{"enable-new-dtags", no_argument, NULL, OPTION_ENABLE_NEW_DTAGS},
|
||||||
{"eh-frame-hdr", no_argument, NULL, OPTION_EH_FRAME_HDR},
|
{"eh-frame-hdr", no_argument, NULL, OPTION_EH_FRAME_HDR},
|
||||||
|
{"no-eh-frame-hdr", no_argument, NULL, OPTION_NO_EH_FRAME_HDR},
|
||||||
{"exclude-libs", required_argument, NULL, OPTION_EXCLUDE_LIBS},
|
{"exclude-libs", required_argument, NULL, OPTION_EXCLUDE_LIBS},
|
||||||
{"hash-style", required_argument, NULL, OPTION_HASH_STYLE},
|
{"hash-style", required_argument, NULL, OPTION_HASH_STYLE},
|
||||||
EOF
|
EOF
|
||||||
@ -2322,6 +2327,10 @@ fragment <<EOF
|
|||||||
link_info.eh_frame_hdr_type = DWARF2_EH_HDR;
|
link_info.eh_frame_hdr_type = DWARF2_EH_HDR;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case OPTION_NO_EH_FRAME_HDR:
|
||||||
|
link_info.eh_frame_hdr_type = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
case OPTION_GROUP:
|
case OPTION_GROUP:
|
||||||
link_info.flags_1 |= (bfd_vma) DF_1_GROUP;
|
link_info.flags_1 |= (bfd_vma) DF_1_GROUP;
|
||||||
/* Groups must be self-contained. */
|
/* Groups must be self-contained. */
|
||||||
|
@ -2270,9 +2270,12 @@ file as @code{__wrap_malloc}; if you do, the assembler may resolve the
|
|||||||
call before the linker has a chance to wrap it to @code{malloc}.
|
call before the linker has a chance to wrap it to @code{malloc}.
|
||||||
|
|
||||||
@kindex --eh-frame-hdr
|
@kindex --eh-frame-hdr
|
||||||
|
@kindex --no-eh-frame-hdr
|
||||||
@item --eh-frame-hdr
|
@item --eh-frame-hdr
|
||||||
Request creation of @code{.eh_frame_hdr} section and ELF
|
@itemx --no-eh-frame-hdr
|
||||||
@code{PT_GNU_EH_FRAME} segment header.
|
Request (@option{--eh-frame-hdr}) or suppress
|
||||||
|
(@option{--no-eh-frame-hdr}) the creation of @code{.eh_frame_hdr}
|
||||||
|
section and ELF @code{PT_GNU_EH_FRAME} segment header.
|
||||||
|
|
||||||
@kindex --ld-generated-unwind-info
|
@kindex --ld-generated-unwind-info
|
||||||
@item --no-ld-generated-unwind-info
|
@item --no-ld-generated-unwind-info
|
||||||
|
@ -1724,6 +1724,8 @@ elf_shlib_list_options (FILE *file)
|
|||||||
fprintf (file, _("\
|
fprintf (file, _("\
|
||||||
--eh-frame-hdr Create .eh_frame_hdr section\n"));
|
--eh-frame-hdr Create .eh_frame_hdr section\n"));
|
||||||
fprintf (file, _("\
|
fprintf (file, _("\
|
||||||
|
--no-eh-frame-hdr Do not create .eh_frame_hdr section\n"));
|
||||||
|
fprintf (file, _("\
|
||||||
--exclude-libs=LIBS Make all symbols in LIBS hidden\n"));
|
--exclude-libs=LIBS Make all symbols in LIBS hidden\n"));
|
||||||
fprintf (file, _("\
|
fprintf (file, _("\
|
||||||
--hash-style=STYLE Set hash style to sysv, gnu or both\n"));
|
--hash-style=STYLE Set hash style to sysv, gnu or both\n"));
|
||||||
|
Loading…
Reference in New Issue
Block a user