mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-03 04:12:10 +08:00
6f156d7a4a
I am checking in the attached patch which updates the binutils support for version 3 binary annotation notes. (Version 3 adds an end address to the ranges covered by the notes, so that it is possible to detect gaps in the coverage). This patch also stops the note merging feature of objcopy from executing if the notes have relocations against them. This makes the code simpler, and prevents the problems with architectures which have unusual relocation management issues. * objcopy.c (objcopy_internal_note): New structure. (gap_exists): New function. (is_open_note): New function. (is_func_note): New function. (is_64bit): New function. (merge_gnu_build_notes): Handle v3 notes. Do not merge if there are relocations against the notes. * readelf.c (get_note_type): Use short names for build attribute notes. (print_symbol_for_build_attribute): Rename to get_symbol_for_build_attribute. Returns the found symbol rather than printing it. (print_gnu_build_attribute_description): Maintain address ranges for function notes as well as global notes. Handle v3 notes. (print_gnu_build_attribute_name): Use more space for printing the name in wide mode. * testsuite/binutils-all/note-2-32.s: Use .dc.l instead of .word. Eliminate symbol references in order to remove the need for relocations. * testsuite/binutils-all/note-2-64.s: Likewise. * testsuite/binutils-all/note-3-32.s: Add a size to the note_1 symbol. * testsuite/binutils-all/note-3-64.s: Likewise. * testsuite/binutils-all/mips/mips-note-2r-n32.d: Update expected output. * testsuite/binutils-all/mips/mips-note-2r-n64.d: Likewise. * testsuite/binutils-all/mips/mips-note-2r.d: Likewise. * testsuite/binutils-all/note-2-32.d: Likewise. * testsuite/binutils-all/note-2-64.d: Likewise. * testsuite/binutils-all/note-3-32.d: Likewise. * testsuite/binutils-all/note-3-64.d: Likewise. * testsuite/binutils-all/note-4-64.s: New test. Checks v3 notes. * testsuite/binutils-all/note-4-32.s: New test. * testsuite/binutils-all/note-4-64.d: New test result file. * testsuite/binutils-all/note-4-32.d: New test result file. |
||
---|---|---|
.. | ||
aarch64 | ||
arc | ||
arm | ||
bfin | ||
hppa | ||
i386 | ||
m68k | ||
mips | ||
vax | ||
wasm32 | ||
windres | ||
x86-64 | ||
add-empty-section.d | ||
add-section.d | ||
add-symbol.d | ||
alias-2.def | ||
alias.def | ||
ar.exp | ||
bintest.s | ||
common-1.s | ||
common-1a.d | ||
common-1b.d | ||
common-1c.d | ||
common-1d.d | ||
common-1e.d | ||
common-1f.d | ||
common-2.s | ||
common-2a.d | ||
common-2b.d | ||
common-2c.d | ||
common-2d.d | ||
common-2e.d | ||
common-2f.d | ||
compress.exp | ||
copy-1.d | ||
copy-1.s | ||
copy-2.d | ||
copy-3.d | ||
copy-4.d | ||
copytest.s | ||
data-sections.s | ||
debug_str.d | ||
debug_str.s | ||
debuglink.s | ||
dlltool.exp | ||
dumptest.s | ||
dw2-1.S | ||
dw2-1.W | ||
dw2-2.S | ||
dw2-3.rS | ||
dw2-3.rt | ||
dw2-3.S | ||
dw2-3.W | ||
dw2-3gabi.W | ||
dw2-compressed.S | ||
dw2-decodedline-1.S | ||
dw2-decodedline.S | ||
dw2-empty.S | ||
dw2-ranges.S | ||
dw2-ranges.W | ||
dw5.S | ||
dw5.W | ||
dwarf-attributes.S | ||
dwarf-attributes.W | ||
dwo.s | ||
elfedit-1.d | ||
elfedit-2.d | ||
elfedit-3.d | ||
elfedit-4.d | ||
elfedit-5.d | ||
elfedit.exp | ||
empty | ||
empty-file | ||
empty.s | ||
exclude-1.s | ||
exclude-1a.d | ||
exclude-1b.d | ||
fastcall.def | ||
group-2.s | ||
group-3.s | ||
group-4.s | ||
group-5.d | ||
group-5.s | ||
group-6.d | ||
group-6.s | ||
group.s | ||
libdw2-compressed.out | ||
libdw2-compressedgabi.out | ||
libdw2.out | ||
link-order.s | ||
linkdebug.s | ||
localize-hidden-1.d | ||
localize-hidden-1.s | ||
localize-hidden-2.d | ||
localize-hidden-2.s | ||
locview-1.s | ||
locview-2.s | ||
mbind1.s | ||
needed-by-reloc.s | ||
nm-1.s | ||
nm-elf-1.s | ||
nm-ver.s | ||
nm.exp | ||
note-1.d | ||
note-2-32.d | ||
note-2-32.s | ||
note-2-64.d | ||
note-2-64.s | ||
note-3-32.d | ||
note-3-32.s | ||
note-3-64.d | ||
note-3-64.s | ||
note-3.32.s | ||
note-4-32.d | ||
note-4-32.s | ||
note-4-64.d | ||
note-4-64.s | ||
objcopy.exp | ||
objdump.exp | ||
objdump.s | ||
objdump.W | ||
objdump.Wk | ||
objdump.WK2 | ||
objdump.WL | ||
only-section-01.d | ||
pr18374.s | ||
pr19020.in | ||
pr19020a.d | ||
pr19020b.d | ||
pr19547.c | ||
readelf.exp | ||
readelf.h | ||
readelf.k | ||
readelf.k2 | ||
readelf.locview-1 | ||
readelf.locview-2 | ||
readelf.n | ||
readelf.pr18374 | ||
readelf.r | ||
readelf.r-64 | ||
readelf.s | ||
readelf.s-64 | ||
readelf.ss | ||
readelf.ss-64 | ||
readelf.ss-mips | ||
readelf.ss-tmips | ||
readelf.wa | ||
readelf.z | ||
remove-relocs-01.d | ||
remove-relocs-01.s | ||
remove-relocs-02.d | ||
remove-relocs-03.d | ||
remove-relocs-04.d | ||
remove-relocs-05.d | ||
remove-relocs-06.d | ||
remove-section-01.d | ||
size.exp | ||
strip-1.d | ||
strip-2.d | ||
strip-3.d | ||
strip-4.d | ||
strip-5.d | ||
strip-6.d | ||
strip-7.d | ||
strip-8.d | ||
strip-9.d | ||
strip-10.d | ||
strip-11.d | ||
strip-12.d | ||
strip-12.s | ||
symbols-1.d | ||
symbols-2.d | ||
symbols-3.d | ||
symbols-4.d | ||
symbols.s | ||
testprog.c | ||
testranges-ia64.d | ||
testranges-ia64.s | ||
testranges.d | ||
testranges.s | ||
unique.s | ||
unknown.s | ||
update-1.s | ||
update-2.s | ||
update-3.s | ||
update-4.s | ||
update-section.exp | ||
version.def | ||
version.s | ||
z.s |