mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] add option to save vmlinux link map
@ 2020-10-23 11:57 Vasily Gorbik
  2020-10-23 11:57 ` [PATCH 1/2] kbuild: add config option to save link map file(s) Vasily Gorbik
  2020-10-23 11:57 ` [PATCH 2/2] s390/decompressor: support link map saving Vasily Gorbik
  0 siblings, 2 replies; 3+ messages in thread
From: Vasily Gorbik @ 2020-10-23 11:57 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: Michal Marek, linux-kernel, linux-kbuild

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(-)

-- 
2.25.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-23 11:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-23 11:57 [PATCH 0/2] add option to save vmlinux link map Vasily Gorbik
2020-10-23 11:57 ` [PATCH 1/2] kbuild: add config option to save link map file(s) Vasily Gorbik
2020-10-23 11:57 ` [PATCH 2/2] s390/decompressor: support link map saving Vasily Gorbik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®