[PATCH] D52303: [lib/MC] - Set SHF_EXCLUDE flag for .dwo sections.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 21 03:03:18 PDT 2018
grimar added a comment.
In https://reviews.llvm.org/D52303#1240891, @dblaikie wrote:
> Have you tested this with binutils dwp tool? Given the overlap between linking and dwp (binutils dwp uses parts of the gold linker implementation I think) - I could imagine marking these as ignore might even end up applying to the dwp tool & breaking that process.
Thanks for the suggestion, I tested it today.
So I took a .dwo produced with the use of this patch, it contained SHF_EXCLUDE .dwo sections:
> Size EntSize Flags Link Info Align
> [ 0] NULL 0000000000000000 00000000
> 0000000000000000 0000000000000000 0 0 0
> [ 1] .strtab STRTAB 0000000000000000 0000016b
> 0000000000000060 0000000000000000 0 0 1
> [ 2] .debug_loc.dwo PROGBITS 0000000000000000 00000040
> 0000000000000000 0000000000000000 E 0 0 1
> [ 3] .debug_str_offset PROGBITS 0000000000000000 00000040
> 0000000000000028 0000000000000000 E 0 0 1
> [ 4] .debug_str.dwo PROGBITS 0000000000000000 00000068
> 000000000000005c 0000000000000001 MSE 0 0 1
> [ 5] .debug_info.dwo PROGBITS 0000000000000000 000000c4
> 000000000000004a 0000000000000000 E 0 0 1
> [ 6] .debug_abbrev.dwo PROGBITS 0000000000000000 0000010e
> 000000000000005d 0000000000000000 E 0 0 1
Then I run dwp (GNU dwp (GNU Binutils) 2.30.51.20180326):
dwp file.dwo -o out
The resulting file had the expected set of debug sections I think:
(It dropped all the flags though, but I think it always does that)
[ 0] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
[ 1] .debug_abbrev.dwo PROGBITS 0000000000000000 00000040
000000000000005d 0000000000000000 0 0 1
[ 2] .debug_loc.dwo PROGBITS 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 1
[ 3] .debug_str_offset PROGBITS 0000000000000000 0000009d
0000000000000028 0000000000000000 0 0 1
[ 4] .debug_str.dwo PROGBITS 0000000000000000 000000c5
000000000000005c 0000000000000000 0 0 1
[ 5] .debug_cu_index PROGBITS 0000000000000000 00000128
0000000000000010 0000000000000000 0 0 8
[ 6] .debug_tu_index PROGBITS 0000000000000000 00000138
0000000000000010 0000000000000000 0 0 8
[ 7] .shstrtab STRTAB 0000000000000000 00000148
0000000000000072 0000000000000000 0 0 1
https://reviews.llvm.org/D52303
More information about the llvm-commits
mailing list