[PATCH] D47602: Correct aligment computation for shared object symbols

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 31 20:09:25 PDT 2018


pcc added inline comments.


================
Comment at: test/ELF/relocation-copy-alignment.s:4
+// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/relocation-copy-alignment.s -o %t2.o
+// RUN: ld.lld -shared %t2.o -o %t.so
+// RUN: ld.lld %t.o %t.so -o %t3
----------------
ruiu wrote:
> pcc wrote:
> > What are the `st_value`s of the symbols in `%t.so`? I don't think this would result in any of them being 0. You might want to consider using `yaml2obj` to create the .so file.
> I want to see a test case with llvm-mc because it would be more realistic test case and demonstrate a real problem. With yaml2obj, it is perhaps too easy to create a nonsensical object file.
I'm not sure if it's actually possible to do that using llvm-mc, though. It may be possible using a linker script, but that seems more fragile than testing for the property more directly.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D47602





More information about the llvm-commits mailing list