This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

binutils metadata in XML


Hi Binutils community,

I'm currently doing research on program metadata in the software
development toolchain. One of the goals of my research is to make more
program information available to runtime systems operating on a
binary. The tools in binutils are a very important part in this
process, and in particular I use the gas listing feature and the ld
link map to help me identify and correlate the metadata.

The problem I have is that neither the assembly listing nor the output
from ld --print-map are conducive to automated processing. For my
initial work I have been using custom python scripts (relying heavily
on regexs) to gather the info I need from the assembly listing, but
I'm starting to wonder if a more general solution would be better. In
general I'm not a huge fan of XML, but since these files really are
metadata that should be potentially extensible, XML seems like a good
fit.

My questions for the group are (1) is there any interest in having XML
output of binutils metadata by anyone other than me? and (2) Do you
have any advice about how to go about the process of XML-enabling this
output? I have played around with gas/listing.c, and came up with a
very rough XML output fairly quickly. However, as far as I could tell,
the ld --print-map feature is not quite so modularized. There I spent
a bit of time creating a yacc grammar that parses that ouput, and uses
libxml2 to build up a DOM tree. Both of those are just prototypes,
mainly to get a feel of how difficult it would be to do practically,
so any advice or suggestions would be greatly appreciated.

Thanks,
-Dan

ps. I'm happy to send the listing.c patch file or ld-map.y file if
people are interested, but as they are nowhere near production
quality, I'm omitting them for


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]