Commit: Gas: Auto-generate GNU Build attribute notes
Nick Clifton
nickc@redhat.com
Thu Apr 26 14:12:00 GMT 2018
Hi Guys,
I am going to apply the attached patch to enhance the assembler so
that it can automatically generate GNU Build attribute notes if none
are present in the input file(s). This will allow these notes to be
generated for assembler source files as well as files not compiled by
gcc.
Note - the new feature is disabled by default, so most users will not
be affected. The feature is controlled by a new command line option:
--generate-missing-build-notes=[yes|no] and the default for this
option is controlled by a configure-time switch.
Tested on a large variety of different targets with no regressions.
Cheers
Nick
gas/ChangeLog
2018-04-26 Nick Clifton <nickc@redhat.com>
* as.c (flag_generate_build_notes): New variable.
(show_usage): Add entry for --generate-missing-build-notes.
(parse_args): Parse --generate-missing-build-notes.
* as.h: Export flag_generate_build_notes.
* symbols.c (save_symbol_name): Ensure that the name parameter is
not NULL.
* write.c (create_obj_attrs_section): Reformat.
(create_note_reloc): New function - creates a relocation for a
field in a GNU Build attribute note.
(maybe_generate_build_notes): New function - created GNU Build
attribute notes if none are present in the output file.
(write_object_file): Call maybe_generate_build_notes.
* configure.ac (--enable-generate-build-notes): New option.
* NEWS: Announce the new feature.
* doc/as.textinfo: Document the new option.
* config.in: Regenerate.
* configure: Regenerate.
binutils/ChangeLog
2018-04-26 Nick Clifton <nickc@redhat.com>
* readelf.c (is_32bit_abs_reloc): Support R_PARISC_DIR32 as a
32-bit absolute reloc for the HPPA target.
* testsuite/binutils-all/note-5.d: New test.
* testsuite/binutils-all/note-5.s: Source file for new test.
* testsuite/binutils-all/objcopy.exp: Run new test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gas-build-notes.patch
Type: text/x-patch
Size: 18524 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20180426/b146a592/attachment.bin>
More information about the Binutils
mailing list