Rui Ueyama
3da3f06dd3
Include version string into ".comment" section.
...
Summary:
This patch adds a ".comment" section to an output. The comment
section contains the linker's version string. You can now
find out whether a binary is created by LLD or not using objdump
command like this.
$ objdump -s -j .comment foo
foo: file format elf64-x86-64
Contents of section .comment:
0000 00474343 3a202855 62756e74 7520342e .GCC: (Ubuntu 4.
0010 382e342d 32756275 6e747531 7e31342e 8.4-2ubuntu1~14.
...
00c0 766d2f74 72756e6b 20323835 38343629 vm/trunk 285846)
00d0 004c696e 6b65723a 204c4c44 20342e30 .Linker: LLD 4.0
00e0 2e302028 7472756e 6b203238 36343036 .0 (trunk 286406
00f0 2900 ).
Compilers emits .comment section as well, so the output contains
both compiler and linker information.
Alternative considered:
I first tried to add a SHT_NOTE section because GNU gold does that.
A NOTE section starts with a header which contains content type.
It turned out that ld.gold sets type NT_GNU_GOLD_VERSION to their
NOTE section. So the NOTE type is only for GNU gold (surprise!)
Next, I tried to create ".linker-version" section. However, it seems
that reusing the existing ".comment" section is better because 1)
other tools already know about .comment section and is able to strip
it and 2) the result contans not only linker info but also compiler
info.
Differential Revision: https://reviews.llvm.org/D26487
llvm-svn: 286496
2016-11-10 20:20:37 +00:00
..
2016-11-08 16:26:32 +00:00
2016-11-10 14:53:24 +00:00
2016-11-10 20:20:37 +00:00
2016-11-10 19:39:05 +00:00
2016-10-04 08:58:55 +00:00
2016-10-04 08:58:55 +00:00
2016-05-10 15:47:57 +00:00
2016-10-04 08:58:55 +00:00
2016-10-04 08:58:55 +00:00
2016-10-04 08:58:55 +00:00
2016-10-04 08:58:55 +00:00
2016-06-11 15:59:09 +00:00
2016-08-18 21:55:23 +00:00
2016-08-18 21:55:23 +00:00
2016-08-18 21:55:23 +00:00
2016-04-08 14:10:41 +00:00
2016-08-18 21:55:23 +00:00
2016-08-18 21:55:23 +00:00
2016-08-18 21:55:23 +00:00
2016-06-11 15:59:09 +00:00
2016-06-11 15:59:09 +00:00
2016-06-11 15:59:09 +00:00
2016-04-26 16:50:02 +00:00
2016-11-10 20:20:37 +00:00
2016-04-05 20:17:33 +00:00
2016-03-16 22:43:36 +00:00
2016-10-04 08:58:55 +00:00
2016-10-04 08:58:55 +00:00
2016-03-28 01:31:11 +00:00
2016-10-04 08:58:55 +00:00
2016-10-04 08:58:55 +00:00
2016-10-04 08:58:55 +00:00
2016-10-04 08:58:55 +00:00
2016-10-04 08:58:55 +00:00
2016-10-04 08:58:55 +00:00
2016-04-06 17:53:31 +00:00
2016-10-04 08:58:55 +00:00
2016-10-04 08:58:55 +00:00
2016-10-04 08:58:55 +00:00
2016-11-09 10:22:29 +00:00
2016-11-01 21:26:28 +00:00
2016-03-29 08:35:42 +00:00
2016-03-02 21:11:36 +00:00
2016-10-26 18:59:00 +00:00
2016-03-09 21:37:22 +00:00
2016-10-20 18:34:58 +00:00
2016-03-31 23:12:18 +00:00
2016-06-07 09:31:52 +00:00
2016-06-07 09:49:40 +00:00
2016-09-20 15:08:24 +00:00
2016-06-07 09:31:52 +00:00
2016-09-20 15:08:24 +00:00
2016-06-07 09:31:52 +00:00
2016-06-07 09:31:52 +00:00
2016-06-07 09:31:52 +00:00
2016-09-13 20:51:32 +00:00
2016-10-10 09:39:26 +00:00
2016-10-10 10:10:27 +00:00
2016-10-10 09:39:26 +00:00
2016-10-10 09:39:26 +00:00
2016-10-21 11:25:33 +00:00
2016-10-20 10:16:13 +00:00
2016-06-07 09:31:52 +00:00
2016-06-07 09:31:52 +00:00
2016-11-01 21:26:28 +00:00
2016-11-01 21:26:28 +00:00
2016-06-07 09:31:52 +00:00
2016-07-08 16:10:27 +00:00
2016-06-07 09:31:52 +00:00
2016-10-27 10:28:53 +00:00
2016-08-31 08:53:21 +00:00
2016-10-17 18:12:24 +00:00
2016-07-25 16:51:52 +00:00
2016-06-16 09:53:46 +00:00
2016-09-20 15:08:24 +00:00
2016-09-01 14:59:11 +00:00
2016-09-30 00:06:24 +00:00
2016-09-30 00:06:24 +00:00
2016-11-09 10:22:29 +00:00
2016-06-16 09:53:46 +00:00
2016-11-09 10:22:29 +00:00
2016-07-20 08:52:27 +00:00
2016-07-20 08:52:27 +00:00
2016-07-20 14:56:26 +00:00
2016-07-20 08:52:27 +00:00
2016-09-23 13:54:48 +00:00
2016-09-23 13:54:48 +00:00
2016-09-23 13:54:48 +00:00
2016-09-23 13:54:48 +00:00
2016-11-09 10:22:29 +00:00
2016-09-08 21:18:38 +00:00
2016-04-30 00:49:10 +00:00
2016-09-02 09:13:05 +00:00
2016-11-10 20:20:37 +00:00
2016-11-10 20:20:37 +00:00
2016-11-10 20:20:37 +00:00
2016-11-10 20:20:37 +00:00
2016-11-10 20:20:37 +00:00
2016-11-10 20:20:37 +00:00
2016-11-01 21:26:28 +00:00
2016-07-25 16:51:52 +00:00
2016-11-10 20:20:37 +00:00
2016-05-10 15:47:57 +00:00
2016-09-22 21:08:51 +00:00
2016-11-10 20:20:37 +00:00
2016-03-07 17:43:39 +00:00
2016-10-12 22:36:31 +00:00
2016-11-08 16:26:32 +00:00
2016-08-18 21:55:23 +00:00
2016-08-18 21:55:23 +00:00
2016-10-19 20:05:43 +00:00
2016-08-18 21:55:23 +00:00
2016-05-05 19:41:49 +00:00
2016-10-19 14:50:26 +00:00
2016-04-27 02:58:27 +00:00
2016-03-24 16:30:20 +00:00
2016-03-24 16:30:20 +00:00
2016-03-01 16:23:13 +00:00
2016-11-01 21:26:28 +00:00
2016-09-09 00:25:56 +00:00
2016-11-08 16:44:48 +00:00
2016-11-01 21:26:28 +00:00
2016-08-22 19:01:53 +00:00
2016-02-26 14:27:47 +00:00
2016-11-02 02:18:01 +00:00
2016-09-02 17:19:28 +00:00
2016-03-17 05:57:33 +00:00
2016-11-01 21:26:28 +00:00
2016-08-18 21:55:23 +00:00
2016-07-21 20:18:30 +00:00
2016-05-02 13:49:42 +00:00
2016-04-12 13:21:13 +00:00
2016-05-23 03:00:33 +00:00
2016-04-27 02:58:27 +00:00
2016-07-14 05:46:24 +00:00
2016-07-20 20:19:58 +00:00
2016-05-23 15:12:41 +00:00
2016-05-24 16:03:27 +00:00
2016-06-27 20:17:08 +00:00
2016-08-22 18:44:04 +00:00
2016-05-23 15:12:41 +00:00
2016-09-30 17:56:20 +00:00
2016-06-28 21:48:33 +00:00
2016-10-27 14:00:51 +00:00
2016-08-08 08:42:48 +00:00
2016-10-19 20:05:43 +00:00
2016-10-04 12:05:42 +00:00
2016-07-04 13:43:12 +00:00
2016-10-20 04:47:45 +00:00
2016-11-01 20:11:01 +00:00
2016-04-22 22:09:35 +00:00
2016-09-26 21:34:34 +00:00
2016-04-28 14:31:09 +00:00
2016-09-29 01:20:40 +00:00
2016-03-24 16:30:20 +00:00
2016-11-01 21:26:28 +00:00
2016-04-22 22:09:35 +00:00
2016-04-22 22:09:35 +00:00
2016-04-22 22:09:35 +00:00
2016-09-30 06:48:09 +00:00
2016-04-21 23:59:19 +00:00
2016-04-26 16:26:45 +00:00
2016-11-04 23:26:29 +00:00
2016-04-15 15:26:52 +00:00
2016-10-24 20:46:21 +00:00
2016-10-20 09:19:48 +00:00
2016-04-04 14:04:16 +00:00
2016-04-26 16:22:51 +00:00
2016-11-10 20:20:37 +00:00
2016-04-26 16:50:02 +00:00
2016-04-26 16:50:02 +00:00
2016-04-26 16:50:02 +00:00
2016-11-10 20:20:37 +00:00
2016-04-07 20:41:41 +00:00
2016-10-04 08:58:55 +00:00
2016-05-09 18:12:15 +00:00
2016-10-05 20:09:50 +00:00
2016-05-28 15:38:13 +00:00
2016-05-28 15:38:13 +00:00
2016-05-28 15:38:13 +00:00
2016-04-30 01:15:17 +00:00
2016-09-06 13:57:15 +00:00
2016-11-01 21:26:28 +00:00
2016-05-04 20:25:19 +00:00
2016-05-04 20:25:19 +00:00
2016-07-06 21:48:50 +00:00
2016-08-31 08:51:39 +00:00
2016-03-15 14:00:22 +00:00
2016-03-15 14:00:22 +00:00
2016-02-25 18:43:51 +00:00
2016-09-02 17:19:28 +00:00
2016-09-02 17:19:28 +00:00
2016-02-25 18:43:51 +00:00
2016-08-22 18:53:09 +00:00
2016-07-13 18:31:44 +00:00
2016-04-30 00:49:10 +00:00
2016-04-27 02:58:27 +00:00
2016-05-22 23:16:14 +00:00
2016-05-22 23:16:14 +00:00
2016-03-12 08:31:34 +00:00
2016-09-09 14:35:36 +00:00
2016-08-18 04:34:27 +00:00
2016-06-27 20:17:08 +00:00
2016-10-31 20:13:41 +00:00
2016-03-29 08:35:42 +00:00
2016-03-24 16:30:20 +00:00
2016-08-31 08:51:39 +00:00
2016-08-31 08:51:39 +00:00
2016-03-30 08:16:11 +00:00
2016-10-10 09:59:34 +00:00
2016-10-05 07:49:18 +00:00
2016-05-04 20:25:19 +00:00
2016-05-04 20:25:19 +00:00
2016-08-03 05:28:02 +00:00
2016-08-03 04:39:42 +00:00
2016-03-12 08:31:34 +00:00
2016-04-29 16:12:29 +00:00
2016-03-24 16:30:20 +00:00
2016-07-22 05:56:43 +00:00
2016-05-04 13:21:06 +00:00
2016-09-04 17:40:12 +00:00
2016-06-19 21:39:37 +00:00
2016-06-19 21:39:37 +00:00
2016-05-28 04:49:57 +00:00
2016-05-08 14:08:40 +00:00
2016-05-13 14:15:37 +00:00
2016-03-31 12:09:36 +00:00
2016-08-18 19:08:36 +00:00
2016-07-14 17:40:18 +00:00
2016-11-05 22:58:01 +00:00
2016-08-12 06:28:49 +00:00
2016-03-12 08:31:34 +00:00
2016-06-19 21:39:37 +00:00
2016-11-01 21:26:28 +00:00
2016-08-18 19:08:41 +00:00
2016-03-29 14:07:22 +00:00
2016-04-13 16:57:28 +00:00
2016-04-24 05:08:43 +00:00
2016-04-13 16:57:28 +00:00
2016-04-13 16:57:28 +00:00
2016-11-09 21:36:56 +00:00
2016-04-13 16:57:28 +00:00
2016-08-31 11:47:21 +00:00
2016-04-14 21:10:05 +00:00
2016-03-15 14:00:22 +00:00
2016-04-12 13:21:13 +00:00
2016-06-27 21:06:40 +00:00
2016-03-30 22:43:14 +00:00
2016-11-05 22:58:01 +00:00
2016-11-09 21:37:06 +00:00
2016-10-04 15:19:20 +00:00
2016-05-21 19:48:54 +00:00
2016-09-29 12:58:42 +00:00
2016-11-09 21:36:56 +00:00
2016-05-04 10:07:38 +00:00
2016-05-24 11:16:14 +00:00
2016-06-20 11:37:56 +00:00
2016-07-20 20:15:33 +00:00
2016-07-26 21:11:30 +00:00
2016-09-29 12:58:36 +00:00
2016-06-20 11:37:56 +00:00
2016-09-08 09:07:19 +00:00
2016-04-20 21:57:51 +00:00
2016-09-05 15:42:43 +00:00
2016-09-08 09:07:19 +00:00
2016-09-08 09:07:19 +00:00
2016-10-21 07:22:30 +00:00
2016-05-27 12:27:21 +00:00
2016-04-27 02:58:27 +00:00
2016-09-08 21:06:29 +00:00
2016-03-03 18:44:38 +00:00
2016-03-29 08:35:42 +00:00
2016-03-17 05:57:33 +00:00
2016-03-01 13:23:29 +00:00
2016-09-22 16:47:21 +00:00
2016-10-18 11:11:03 +00:00
2016-10-18 11:11:03 +00:00
2016-09-30 00:06:24 +00:00
2016-06-17 17:01:38 +00:00
2016-11-10 20:20:37 +00:00
2016-10-04 08:58:55 +00:00
2016-04-15 17:21:29 +00:00
2016-02-29 18:05:21 +00:00
2016-03-12 08:31:34 +00:00
2016-04-27 12:21:27 +00:00
2016-05-18 21:03:36 +00:00
2016-11-01 18:30:28 +00:00
2016-04-05 22:08:39 +00:00
2016-04-29 23:28:36 +00:00
2016-04-30 00:49:10 +00:00
2016-04-07 12:02:42 +00:00
2016-05-04 20:25:19 +00:00
2016-11-01 21:26:28 +00:00
2016-11-01 21:26:28 +00:00
2016-11-10 20:20:37 +00:00
2016-03-11 14:57:33 +00:00
2016-04-15 14:11:36 +00:00
2016-10-05 20:09:50 +00:00
2016-08-02 08:49:57 +00:00
2016-08-19 08:31:02 +00:00
2016-11-10 20:20:37 +00:00
2016-05-01 04:55:03 +00:00
2016-06-09 20:22:35 +00:00
2016-02-23 18:39:55 +00:00
2016-02-23 18:39:55 +00:00
2016-08-31 23:24:11 +00:00
2016-03-12 08:31:34 +00:00
2016-05-13 14:15:37 +00:00
2016-08-03 05:28:02 +00:00
2016-05-03 01:21:08 +00:00
2016-05-03 01:21:08 +00:00
2016-05-03 01:21:08 +00:00
2016-04-25 14:05:44 +00:00
2016-04-30 00:49:10 +00:00
2016-04-30 00:49:10 +00:00
2016-04-18 12:58:59 +00:00
2016-05-05 19:41:49 +00:00
2016-11-09 20:54:01 +00:00
2016-05-03 17:30:44 +00:00
2016-05-03 17:30:44 +00:00
2016-09-08 08:57:51 +00:00
2016-08-10 17:42:26 +00:00
2016-11-01 21:26:28 +00:00
2016-06-27 20:17:08 +00:00
2016-11-10 20:20:37 +00:00
2016-05-04 20:25:19 +00:00
2016-10-05 20:09:50 +00:00
2016-11-03 12:49:25 +00:00
2016-11-02 02:18:01 +00:00
2016-11-10 20:20:37 +00:00
2016-06-20 17:58:09 +00:00
2016-03-12 08:31:34 +00:00
2016-06-14 21:56:36 +00:00
2016-04-08 20:49:31 +00:00
2016-02-25 08:40:26 +00:00
2016-10-13 22:20:18 +00:00
2016-08-19 15:36:32 +00:00
2016-08-19 15:36:32 +00:00
2016-05-05 16:38:46 +00:00
2016-11-10 20:20:37 +00:00
2016-04-27 02:58:27 +00:00
2016-04-07 21:10:09 +00:00
2016-11-10 09:05:20 +00:00
2016-07-25 16:51:52 +00:00
2016-03-24 16:30:20 +00:00
2016-10-26 11:07:09 +00:00
2016-06-21 06:03:28 +00:00
2016-05-10 15:47:57 +00:00
2016-03-08 21:17:31 +00:00
2016-04-01 12:54:27 +00:00
2016-05-10 15:47:57 +00:00
2016-08-20 10:54:51 +00:00
2016-03-11 18:33:48 +00:00
2016-11-08 16:26:32 +00:00
2016-02-23 18:39:55 +00:00
2016-03-22 13:24:29 +00:00
2016-05-04 20:06:49 +00:00
2016-04-02 00:19:22 +00:00
2016-07-25 16:51:52 +00:00
2016-09-14 16:26:19 +00:00
2016-10-26 11:07:09 +00:00
2016-09-23 18:47:50 +00:00
2016-04-13 18:07:57 +00:00
2016-07-17 17:50:09 +00:00
2016-04-12 12:01:31 +00:00
2016-10-26 11:07:09 +00:00
2016-09-08 08:57:51 +00:00
2016-11-01 21:26:28 +00:00
2016-02-24 18:24:23 +00:00
2016-04-30 01:15:17 +00:00
2016-11-01 09:17:50 +00:00
2016-09-08 20:35:29 +00:00
2016-10-26 11:07:09 +00:00
2016-05-09 15:25:54 +00:00
2016-07-17 17:23:17 +00:00
2016-07-01 11:45:10 +00:00
2016-08-31 20:03:54 +00:00
2016-06-09 20:35:27 +00:00
2016-10-26 11:07:09 +00:00
2016-11-02 02:18:01 +00:00
2016-09-07 20:50:41 +00:00
2016-10-31 20:13:41 +00:00
2016-11-01 21:26:28 +00:00
2016-09-07 20:50:41 +00:00
2016-09-15 12:44:38 +00:00
2016-09-08 14:50:55 +00:00
2016-09-07 20:50:41 +00:00
2016-11-01 21:26:28 +00:00
2016-04-29 23:35:49 +00:00
2016-06-09 15:45:49 +00:00
2016-09-07 20:50:41 +00:00
2016-11-01 21:26:28 +00:00
2016-03-14 09:19:30 +00:00
2016-04-15 11:57:07 +00:00
2016-04-26 13:50:46 +00:00
2016-11-01 21:26:28 +00:00
2016-04-27 02:58:27 +00:00
2016-08-03 05:28:02 +00:00
2016-06-11 15:59:09 +00:00
2016-06-11 15:59:09 +00:00
2016-07-12 23:28:33 +00:00
2016-10-27 17:28:56 +00:00
2016-06-17 15:42:36 +00:00
2016-06-11 15:59:09 +00:00
2016-03-08 19:51:58 +00:00
2016-06-11 15:59:09 +00:00
2016-05-20 20:02:27 +00:00
2016-07-04 17:34:53 +00:00
2016-06-08 21:31:59 +00:00
2016-04-05 20:51:50 +00:00
2016-10-26 11:07:09 +00:00
2016-08-17 23:59:58 +00:00