[PATCH] D39769: [llvm-objcopy] Add --strip-all option to llvm-objcopy

Jake Ehrlich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 13 11:43:35 PST 2017


jakehehrlich added a comment.

> I find it slightly surprising that yaml2obj automatically assumes relocation sections with SHF_ALLOC to be dynamic relocation sections, given we're working with an ELF of ET_REL type. Given that though, this is okay.

It assumes them to be *non*-dynamic and llvm-objcopy complains when a dynamic relocation uses a non-dynamic symbol table. So it's llvm-objcopy making this assumption (but yaml2obj is making the opposite assumption unfortunately). Dynamic relocations don't really make sense in ET_REL unfortunately so I'm not sure either is in the wrong here. There's a change that just got approved in yaml2obj that adds dynamic symbol table support so we're not too far off from having a way to test lots of .dyn* stuff with it. We're just missing .dynamic and the ability to set the link for dynamic relocations to .dynsym instead of .symtab. After thats all working I'd like to go back and improve some of these tests so that we can use yaml2obj more widely.


Repository:
  rL LLVM

https://reviews.llvm.org/D39769





More information about the llvm-commits mailing list