home | list info | list archive | date index | thread index

readelf/objdump to dump included symbols and including source files?

  • Subject: readelf/objdump to dump included symbols and including source files?
  • From: "Robert P. J. Day" <rpjday [ at ] crashcourse [ dot ] ca>
  • Date: Sun, 7 Apr 2019 11:55:30 -0400 (EDT)
  while i'm asking this in the context of an ARM-based u-boot ELF
executable (for which i have all the corresponding ARM-related
utilities), i suspect it would work equally well on native ELF files.

  in u-boot source, there are many examples of the same function being
defined in multiple places in the code, and the configuration
responsible for selecting one of them to be compiled and built into
the final ELF image.

  the first technique is, of course, that the board configuration will
end up including only the appropriate version of the routine.

  the second technique is that a common implementation might be
declared with the "weak" attribute, while specific boards or
architectures might override that. in any event, the final executable
will, for these routines, have a single included version of that
routine that came from a particular source file, and that's what i
want to print out.

  i'm sure that, once upon a time, using either readelf or objdump, i
found a variation with a certain collection of options that displayed
no more than each included routine in the final ELF file and the
source file it came from. and at the moment, i am completely
forgetting how i did it.

  thoughts? surely this can't be hard, it's just escaping me right
now.

rday

To unsubscribe send a blank message to linux+unsubscribe [ at ] linux-ottawa [ dot ] org
To get help send a blank message to linux+help [ at ] linux-ottawa [ dot ] org
To visit the archives: https://lists.linux-ottawa.org