[PATCH] D61647: llvm-objdump: when ELF st_other field is set, print its value before symbol name
Sean Fertile via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 7 13:44:35 PDT 2019
sfertile added a comment.
Adding MaskRay as a reviewer for their familiarity with the llvm tools.
This definitely seems a useful upgrade to me. Unfortunately it might affect **a lot **of lit tests. If we do intend to make a change we should try to match the output of the binutils objdump. I can see from the surrounding context we print out '.hidden', having a quick look it seems binutils will print out the visibility if its the only thing set, and the hex value otherwise (ie not both) here is an example:
other.c:
int a = 55;
__attribute__((visibility("hidden"), weak))
int foo(void) {
return a;
}
__attribute__((visibility("protected")))
int exported_func(void) {
return a;
}
__attribute__((visibility("protected")))
int single_entry(void) {
return 55;
}
__attribute__((visibility("internal")))
int internal_func(void) {
return 1234;
}
int bar(void) {
return foo();
}
objdump output:
0000000000000000 g O .data 0000000000000004 a
0000000000000000 w F .text 0000000000000040 0x62 foo
0000000000000000 *UND* 0000000000000000 .TOC.
0000000000000040 g F .text 0000000000000040 0x63 exported_func
0000000000000080 g F .text 000000000000002c .protected single_entry
00000000000000ac g F .text 000000000000002c .internal internal_func
00000000000000d8 g F .text 0000000000000048 0x60 bar
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61647/new/
https://reviews.llvm.org/D61647
More information about the llvm-commits
mailing list