Commit 336cdba8 authored by David Mosberger-Tang's avatar David Mosberger-Tang Committed by Tony Luck

[IA64] need NOTES in vmlinux.lds.S

Add NOTES to linker script such that the kernel can be built with
recent versions of binutils.  Without this patch, final link fails
with this error:

ld: .tmp_vmlinux1: section `.text' can't be allocated in segment 0
ld: final link failed: Bad value

This error is due to the fact that the --build-id option is used
with newer linkers to include a .notes section on the kernel, but
without the NOTES macro, that section won't be included in the kernel
which then leads to the above error message.
Signed-off-by: default avatarDavid Mosberger-Tang <dmosberger@gmail.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 5d36aa9b
...@@ -20,6 +20,7 @@ PHDRS { ...@@ -20,6 +20,7 @@ PHDRS {
code PT_LOAD; code PT_LOAD;
percpu PT_LOAD; percpu PT_LOAD;
data PT_LOAD; data PT_LOAD;
note PT_NOTE;
} }
SECTIONS SECTIONS
{ {
...@@ -62,6 +63,9 @@ SECTIONS ...@@ -62,6 +63,9 @@ SECTIONS
/* Read-only data */ /* Read-only data */
NOTES :code :note /* put .notes in text and mark in PT_NOTE */
code_continues : {} :code /* switch back to regular program... */
/* Exception table */ /* Exception table */
. = ALIGN(16); . = ALIGN(16);
__ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET)
...@@ -276,10 +280,6 @@ SECTIONS ...@@ -276,10 +280,6 @@ SECTIONS
.debug_typenames 0 : { *(.debug_typenames) } .debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) } .debug_varnames 0 : { *(.debug_varnames) }
/* These must appear regardless of . */ /* These must appear regardless of . */
/* Discard them for now since Intel SoftSDV cannot handle them.
.comment 0 : { *(.comment) }
.note 0 : { *(.note) }
*/
/DISCARD/ : { *(.comment) } /DISCARD/ : { *(.comment) }
/DISCARD/ : { *(.note) } /DISCARD/ : { *(.note) }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment