mbox series

[0/2] add option to save vmlinux link map

Message ID cover.thread-ba6b03.your-ad-here.call-01603453670-ext-0242@work.hours (mailing list archive)
Headers show
Series add option to save vmlinux link map | expand

Message

Vasily Gorbik Oct. 23, 2020, 11:57 a.m. UTC
Linker -Map option allows to save detailed link map which provides far
more information then the objdump tool might extract.

Discarded input sections
 .text.__s390_indirect_jump_r14
                0x0000000000000000        0xc arch/s390/kernel/process.o

Detailed information on sections, objects and symbols.
.init.data      0x0000000001276000    0x671f0
 *(SORT_BY_NAME(___kentry+*))
 *(.init.data init.data.*)
 .init.data     0x0000000001276000     0x31b8 init/main.o
                0x0000000001276128                late_time_init
                0x00000000012781b8                boot_command_line
 .init.data     0x00000000012791b8       0x60 init/do_mounts.o
 .init.data     0x0000000001279218        0x4 init/do_mounts_rd.o
                0x0000000001279218                rd_image_start
 *fill*         0x000000000127921c        0x4
 .init.data     0x0000000001279220       0x18 init/do_mounts_initrd.o
                0x0000000001279228                phys_initrd_start
                0x0000000001279230                phys_initrd_size

It helps to bring the light on linker decisions and debug linker scripts.
 FILL mask 0xff
                0x000000000082f000                . = ALIGN (0x1000)
 *fill*         0x000000000082e3fa      0xc06 ff
                0x000000000082f000                _end = .

Resulting vmlinux.map is currently 8.8M for s390.
And 48K for the decompressor's arch/s390/boot/compressed/vmlinux.map

- First patch introduces CONFIG_SAVE_LINK_MAP option, which enables
  link map and is arch independent.
- Second patch is s390 specific and additionally enables decompressor's
  link map saving if CONFIG_SAVE_LINK_MAP is enabled.

It is probably better if both changes would go via kbuild tree.

Vasily Gorbik (2):
  kbuild: add config option to save link map file(s)
  s390/decompressor: support link map saving

 .gitignore                         |  1 +
 Makefile                           |  6 +++++-
 arch/s390/boot/compressed/Makefile |  4 +++-
 lib/Kconfig.debug                  | 13 +++++++++++++
 4 files changed, 22 insertions(+), 2 deletions(-)