[PATCH] D69304: [llvm-objcopy] - Do not crash on object that has relocations but no symbol table.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 22 09:48:28 PDT 2019
MaskRay added a comment.
An alternative approach is to generalize `else if (EnsureSymtab)` for non --add-symbol= operations as well. I need to investigate more to check whether that is feasible. If it does, it can save us some SymbolTable nullness checks later. ()I should also address another problem raised in D69093 <https://reviews.llvm.org/D69093> (`SectionNames` is initialized after `if (Obj.SectionNames != &Sec)`)
================
Comment at: test/tools/llvm-objcopy/ELF/relocations-no-symtab.test:2
+## Check that we can copy an object that has a relocation
+## without symbol associated even when there is no symbol table.
+
----------------
that holds symbol index 0
================
Comment at: test/tools/llvm-objcopy/ELF/relocations-no-symtab.test:4
+
+# RUN: yaml2obj --docnum=1 %s > %t1
+# RUN: llvm-objcopy %t1 %t2
----------------
`-o`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69304/new/
https://reviews.llvm.org/D69304
More information about the llvm-commits
mailing list