ELF: Include the build ID section in the first page.
authorRui Ueyama <ruiu@google.com>
Sun, 13 Mar 2016 01:54:48 +0000 (01:54 +0000)
committerRui Ueyama <ruiu@google.com>
Sun, 13 Mar 2016 01:54:48 +0000 (01:54 +0000)
commit28286cdfc7818a97304349d7f491322bfc2dc8da
treeaabb265d28fb5d95bd592d73a1d6973c1f8d3e76
parentb325686764c3f04c9c40427b27d563530844eb91
ELF: Include the build ID section in the first page.

At least Linux has the kernel configuration to include the first page
of the executable into core files. We want build ID section to be
included in core files to identify them.

Here is the link to the description about the kernel configuration.

https://github.com/torvalds/linux/blob/097f70b3c4d84ffccca15195bdfde3a37c0a7c0f/fs/Kconfig.binfmt#L46

llvm-svn: 263351
lld/ELF/Writer.cpp
lld/test/ELF/build-id.s