[systemd-devel] Compiling in a sandbox
Lennart Poettering
lennart at poettering.net
Fri Jul 9 09:39:56 PDT 2010
On Fri, 09.07.10 08:46, Karel Zak (kzak at redhat.com) wrote:
>
> On Fri, Jul 09, 2010 at 12:02:13AM +0200, Lennart Poettering wrote:
> > A thinkable alternative would be if we could extract this information
> > directly from the ELF file, without having to execute it. That would
> > probably be useful when cross-building systemd. But I am not aware of
> > any somewhat standard tool to extract data fields from ELF
> > files. Anyone?
>
> man readelf
>
> and if I good remember autotools use also objdump.
To my knowledge neither of these tools has a nice way to extract one
particular variable from .rodata. "readelf -p .rodata" comes close, but
not quite since we probably need the debugging symbols to find the right
variable in that list... An alternative would be to stick each
introspection blob into its own ELF section. But even then we'd still
need some ugly postprocessing of the readelf output?
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list