[OpenWrt-Devel] [LEDE-DEV] [PATCH] include/kernel: Do not strip kernel's Elf

Alexey Brodkin Alexey.Brodkin at synopsys.com
Wed May 18 09:06:42 EDT 2016


Hi Felix,

On Wed, 2016-05-18 at 14:57 +0200, Felix Fietkau wrote:
> On 2016-05-16 16:42, Alexey Brodkin wrote:
> > 
> > If an image gets built as an Elf there's a chance
> > it will be used by developers for debugging purposes.
> > In that case it's very helpful to keep debugging info
> > in that image.
> > 
> > I would think that most OWRT-powered devices in production
> > will use some form of binary image for booting so Elf
> > flavours could be left a bit bulkier with more debug info
> > inside.
> > 
> > Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com>
> You can get the bulky one directly from the kernel source directory, and
> there is definitely some value in having stripped ELF binaries as well
> for devices that can load them.

Well indeed in kernel's source directory we have an unstripped elf.
But what happens at least in case of ARC we build only one kernel's elf
and then as a post-built step we patch in .dtb for all boards we build OWRT.

In other words in "bin/arc770-uClibc" folder I have:
 1) openwrt-arc770-generic-axs101-initramfs.elf
 2) openwrt-arc770-generic-nsim_700-initramfs.elf

Both are stripped but work as they are on the corresponding boards.

In "build_dir/target-arc_arc700_uClibc-1.0.9/linux-arc770_generic/linux-4.4.7/"
I have perfectly unstripped vmlinux but it won't work on either board because of
missing device tree blob.

That means if one wants to get image for a board X with debug symbols he or she
will need to do manual patching in of .dtb. Which is not the most convenient thing ever.

-Alexey
_______________________________________________
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