Otherwise overlaps might happen (and actually having anything but .text
here at moment make no sense) and it triggers the following error on
Golden ld
# ld: error: load segment overlap [0x0 -> 0x38c] and [0x0 -> 0x0]
Reported-and-tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
OUTPUT_ARCH(i386)
SECTIONS {
- . = 0;
- .text : {
+ .text 0 : {
*(.text)
}
+
+ /DISCARD/ : {
+ *(.debug*)
+ *(.data)
+ *(.bss)
+ *(.eh_frame*)
+ }
}