[PATCH] D55329: [llvm-readobj] Little clean up inside `parseDynamicTable`
Sid Manning via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 12 15:06:16 PST 2018
sidneym added a comment.
FWIW: The check you mention in ELF.cpp is triggered by the following test script. This causes llvm-readelf to generate an unexpected error message, LLVM ERROR: Virtual address is not in any segment
cat > 1.c << \!
int foo = 10;
int main() { return foo; }
!
cat > script.t << \!
PHDRS {
CODE_RO PT_LOAD;
DATA PT_LOAD;
GOT PT_LOAD;
DYN PT_LOAD;
DYNAMIC PT_DYNAMIC;
RELADYN PT_LOAD;
}
SECTIONS {
.text : { *(.text) } :CODE_RO
.data : { *(.data) } :DATA
.dynamic : { *(.dynamic) }: DYN : DYNAMIC
.rela.dyn : {*(.rel.dyn)} : RELADYN
}
!
gcc -c 1.c -fPIC
ld -shared 1.o -T script.t -Bsymbolic -pie -soname foo -o foo
echo llvm-readelf:
llvm-readelf -d foo
echo readelf:
readelf -d foo
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55329/new/
https://reviews.llvm.org/D55329
More information about the llvm-commits
mailing list