[PATCH] D58437: [yaml2obj][obj2yaml] - Support SHT_GNU_verdef ( .gnu.version_d) section.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 20 07:24:30 PST 2019


grimar marked an inline comment as done.
grimar added inline comments.


================
Comment at: test/tools/obj2yaml/verdef-section.yaml:69-71
+DynamicSymbols:
+  Global:
+    - Name:            foo
----------------
jhenderson wrote:
> grimar wrote:
> > jhenderson wrote:
> > > Do you need this symbol?
> > Yes, it triggers the creation of `.dynsym` and `.dynstr`. I need the latter.
> Okay. You could always create an explicit .dynstr section instead though. But this is fine.
I wanted/tried to do in that way initially but found it is probably not very correct.
It does not seem we can have `.gnu_version_d` section without a .dynsym/.dynstr in
a normally created ELF.

For example, in LLD we might add .dynstr and all 3 versioning sections only when having a .dynsym.:
https://github.com/llvm-mirror/lld/blob/master/ELF/Writer.cpp#L338

Also, it would add slightly more code, so I refused from this idea because of all of that.

(For the purpose of creating invalid objects, that might be useful, probably, though, but I have no use case atm)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58437/new/

https://reviews.llvm.org/D58437





More information about the llvm-commits mailing list