[OpenWrt-Devel] [PATCH] Allow kernel modules to keep build ID debug symbol.
Toke Høiland-Jørgensen
toke at toke.dk
Fri Oct 30 10:03:42 EDT 2015
Felix Fietkau <nbd at openwrt.org> writes:
> As far as I know, the build-id is build host specific, so I don't think
> it will really help you with tracking versions of other people's
> builds.
Yup. But you can pass it explicitly to the linker:
LDFLAGS_MODULE=--build-id=0x$(PKG_SOURCE_VERSION)
where PKG_SOURCE_VERSION is the git hash.
> I think for what you're trying to do, it might be better to use
> something else. You could just embed a custom section in your module
> containing a git hash of the source tree, or something like that.
Well the nice thing about this is that it requires very little change in
other places: The facility to export it in sysfs is already in the
kernel, and it's a one-line change to the build invocation (as above) to
get it included.
If you're opposed to adding this change, I guess that adding a custom
note section to the module might be an alternative way to go about it;
if I can figure out how to do that...
-Toke
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list