Commit: Add --warn-orphan option to the linker
Nick Clifton
nickc@redhat.com
Tue Apr 7 15:28:00 GMT 2015
Hi Guys,
I am applying the attached patch to add a small new feature to the
linker: a command line option --warn-orphan that generates a warning
message whenever a orphan section is placed into the output file.
Whilst this information could be discovered by parsing a map generated
by the --map option, this new option makes it simpler and easier to
discover orphan sections, which should help when writing linker
scripts.
Cheers
Nick
ld/ChangeLog
2015-04-07 Nick Clifton <nickc@redhat.com>
* ld.h (struct ld_config_type): Add new field: warn_orphan.
* ldlex.h (enum option_values): Add OPTION_WARN_ORPHAN and
OPTION_NO_WARN_ORPHAN.
* lexsup.c (ld_options): Add --warn-orphan and --no-warn-orphan.
(parse_args): Handle the new options.
* ldemul.c (ldemul_place_orphan): If requested, generate a warning
message when an orphan section is placed in the output file.
* ld.texinfo: Document the new option.
* NEWS: Mention the new feature.
ld/testsuite/ChangeLog
2015-04-07 Nick Clifton <nickc@redhat.com>
* ld-elf/orphan-5.l: New test - checks the linker's output with
--warn-orphan enabled.
* ld-elf/elf.exp: Run the new test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ld.warn-orphans.patch
Type: text/x-patch
Size: 4561 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150407/7fca85b7/attachment.bin>
More information about the Binutils
mailing list