Aaron Durbin
f69a99dbf8
coreboot: x86: enable gc-sections
Garbage collected sections allow for trimming the size of the
binaries as well as allowing for not needing to config off
unused functions. To that end, on a rambi build the following
differences are observed:
$ diff -up \
<(readelf -l coreboot-builds/google_rambi/cbfs/fallback/ramstage.elf) \
<(readelf -l coreboot-builds/google_rambi_gc_sections/cbfs/fallback/ramstage.elf)
--- /dev/fd/63 2015-03-10 12:07:27.927985430 -0500
+++ /dev/fd/62 2015-03-10 12:07:27.927985430 -0500
@@ -6,9 +6,9 @@ There are 4 program headers, starting at
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg
Align
LOAD 0x001000 0x00000000 0x00000000 0x00040 0x00040 RWE 0
- LOAD 0x001040 0x00000040 0x00000040 0x34560 0x34560 RWE 0
- LOAD 0x0355a0 0x000345a0 0x000345a0 0x02578 0x02578 RWE 0
- LOAD 0x037b18 0x00036b18 0x00036b18 0x00000 0x0b560 0
+ LOAD 0x001040 0x00000040 0x00000040 0x2cbf8 0x2cbf8 RWE 0
+ LOAD 0x02dc38 0x0002cc38 0x0002cc38 0x02208 0x02208 RWE 0
+ LOAD 0x02fe40 0x0002ee40 0x0002ee40 0x00000 0x0a888 0
Section to Segment mapping:
Segment Sections...
$ diff -up \
<(readelf -l coreboot-builds/google_rambi/cbfs/fallback/romstage.elf) \
<(readelf -l coreboot-builds/google_rambi_gc_sections/cbfs/fallback/romstage.elf)
--- /dev/fd/63 2015-03-10 12:08:16.855985880 -0500
+++ /dev/fd/62 2015-03-10 12:08:16.851985880 -0500
@@ -5,8 +5,8 @@ There are 1 program headers, starting at
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg
Align
- LOAD 0x000060 0xfff20000 0xfff20000 0x08b81 0x08b81 R E
0x10
+ LOAD 0x000060 0xfff20000 0xfff20000 0x06300 0x06300 R E
0x10
Section to Segment mapping:
Segment Sections...
- 00 .rom .text
+ 00 .rom
The following warnings needed to be applied to CFLAGS_common because for
some reason gcc was miraculously emitting the warnings with the
unrelated *-sections options:
-Wno-unused-but-set-variable
Change-Id: I210784fdfc273ce4cb9927352cbd5a51be3c6929
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/8635
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2015-03-17 14:35:31 +01:00
..
2015-01-09 06:12:22 +01:00
2014-03-03 21:47:27 +01:00
2014-05-01 15:39:26 +02:00
2015-01-13 21:30:14 +01:00
2014-11-19 00:13:26 +01:00
2014-12-30 19:29:47 +01:00
2014-12-09 18:40:09 +01:00
2015-03-09 02:32:19 +01:00
2015-01-27 22:50:14 +01:00
2014-06-20 08:06:51 +02:00
2013-07-10 20:17:51 +02:00
2015-03-09 17:53:16 +01:00
2015-01-09 06:12:22 +01:00
2003-07-19 04:28:22 +00:00
2015-03-09 02:32:19 +01:00
2015-02-05 17:37:05 +01:00
2015-03-17 04:22:23 +01:00
2014-07-08 13:52:15 +02:00
2013-05-01 07:08:44 +02:00
2013-01-12 19:09:55 +01:00
2013-07-10 20:17:51 +02:00
2013-01-12 19:09:55 +01:00
2015-01-09 06:12:22 +01:00
2015-01-09 06:12:22 +01:00
2014-11-30 12:20:05 +01:00
2015-03-04 19:46:25 +01:00
2014-05-05 08:59:05 +02:00
2010-04-27 06:56:47 +00:00
2010-02-22 16:41:49 +00:00
2013-09-17 21:04:35 +02:00
2015-03-09 22:42:28 +01:00
2014-12-04 19:17:51 +01:00
2010-04-27 06:56:47 +00:00
2015-03-17 14:35:31 +01:00
2014-11-11 12:33:01 +01:00
2012-03-09 20:00:53 +01:00
2003-04-22 19:02:15 +00:00
2009-01-20 21:40:16 +00:00
2004-03-13 03:40:29 +00:00
2015-03-04 19:55:19 +01:00
2009-01-20 21:40:16 +00:00
2015-01-09 16:50:55 +01:00
2014-12-28 19:56:58 +01:00
2015-01-09 06:12:22 +01:00
2015-02-15 08:50:22 +01:00
2015-01-27 22:54:32 +01:00
2015-03-17 14:35:31 +01:00
2014-12-31 05:26:27 +01:00
2014-09-12 22:03:53 +02:00
2014-08-07 23:55:15 +02:00
2013-05-01 07:19:12 +02:00
2015-01-05 22:21:49 +01:00
2015-01-27 01:43:57 +01:00
2015-01-27 01:43:57 +01:00
2015-01-27 01:43:57 +01:00
2015-02-06 00:25:59 +01:00
2013-03-01 10:16:08 +01:00
2015-03-09 17:53:16 +01:00