<div dir="ltr">I'm not really pushing back, and I'm not opposing to your idea to add the feature to obj2yaml/yaml2obj, but if you can do what you want to do using existing tools, why do you want to write new code?<div><br></div><div>For tests, you might be able to llvm-objdump which can dump .dynsym contents. obj2yaml and yaml2obj are the tools to serialize and de-serialize a binary file, so if you don't need a round-trip conversion, other tool might fit better.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 1, 2017 at 1:11 PM, Dave Lee <span dir="ltr"><<a href="mailto:davelee.com@gmail.com" target="_blank">davelee.com@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class="">> <span style="font-size:12.800000190734863px">Can't you do that by generating a small assembly file and compile & link it to a .so?</span><div><span style="font-size:12.800000190734863px"><br></span></div></span><div><span style="font-size:12.800000190734863px">I could, though I admit I haven't consider that approach. Thanks for the suggestion. If there is opposition to adding support for dynamic symbols, then I will try the assembly+linker approach, but if I can add the support for dynamic symbols, then I'll continue with yaml2obj, at least for now. We also had a test case we wanted to write using obj2yaml but couldn't because of the lack of dynamic symbols.</span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 1, 2017 at 12:40 PM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Wed, Nov 1, 2017 at 11:56 AM, Dave Lee <span dir="ltr"><<a href="mailto:davelee.com@gmail.com" target="_blank">davelee.com@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span>> <span style="font-size:12.800000190734863px">I wonder why you want to add the new feature to yaml2obj. Maybe, explaining your motivation would help others understand your problem.</span><div><span style="font-size:12.800000190734863px"><br></span></div></span><div><span style="font-size:12.800000190734863px">Thanks for the cue! I am using yaml2obj to generate stub dynamic libraries.</span></div></div></blockquote><div><br></div></span><div>Can't you do that by generating a small assembly file and compile & link it to a .so?</div><span><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_7529190687673907443m_4217858079160656938HOEnZb"><div class="m_7529190687673907443m_4217858079160656938h5"><div class="gmail_extra"><div class="gmail_quote">On Wed, Nov 1, 2017 at 11:29 AM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I don't have a strong opinion on this. yaml2obj was there when I joined to the project, and we are not using it for ELF in lld to test lld's features anyway, so I'm not really a user of the bool. But, I wonder why you want to add the new feature to yaml2obj. Maybe, explaining your motivation would help others understand your problem.</div><div class="m_7529190687673907443m_4217858079160656938m_-7204919544204602096HOEnZb"><div class="m_7529190687673907443m_4217858079160656938m_-7204919544204602096h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 1, 2017 at 10:43 AM, Dave Lee <span dir="ltr"><<a href="mailto:davelee.com@gmail.com" target="_blank">davelee.com@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'm adding support for elf dynamic symbols in yaml2obj/obj2yaml. I'm seeking opinions about how to model dynamic symbols (and symbols in general) in the yaml structure. Currently, symbols in elf are represented by a top level `Symbols` key, within which symbols are grouped by binding type (Global, Weak, Local). The simplest thing to do would be to mirror this structure to a DynamicSymbols (or SymbolsDynamic). Is there other ways people would like to see this structure represented? Saleem suggested symbols be modeled more closely to the elf spec, and that the binding type should be represented as an attribute on each symbol, not as a grouping. For comparison, coff and macho both appear to represent the file format more directly, without much (any?) added abstraction.<div><br></div><div>Short pseudo example of the current symbol structure:<br><div><div><br></div><div>    Symbols:</div><div>      Global:</div><div>        - Name: ...</div><div>          Type: ...</div><div>          Section: ...</div><div><div>          ...</div><div>      Weak:</div><div>        - Name: ...</div><div>          Type: ...</div><div>          Section: ...</div></div><div>          ...</div><div>      Local:<br></div><div><div>        - Name: ...</div><div>          Type: ...</div><div>          Section: ...</div></div><div><div>          ...</div></div><div><br></div></div></div><div>thanks,</div><div>Dave</div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></span></div><br></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>