[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: build-id change breaks ia64 build too?



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


Rick,

Looks like the same error that David Mosberger found.  I have his
fix in my local tree but haven't pushed it out yet.

Please let me know if his patch fixes your problem or not.

Tony -

It appears that the patch fixes the problem. Thanks. Hopefully this will be in -rc4 or whatnot?

rick jones


-Tony

---

commit 336cdba8640677117bc3fd101e3e1a34c98a275d
Author: David Mosberger-Tang <dmosberger@gmail.com>
Date:   Thu Aug 9 11:53:15 2007 -0600

    [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: David Mosberger-Tang <dmosberger@gmail.com>
    Signed-off-by: Tony Luck <tony.luck@intel.com>

diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S
index 83e8067..446f12d 100644
--- a/arch/ia64/kernel/vmlinux.lds.S
+++ b/arch/ia64/kernel/vmlinux.lds.S
@@ -20,6 +20,7 @@ PHDRS {
   code   PT_LOAD;
   percpu PT_LOAD;
   data   PT_LOAD;
+  note   PT_NOTE;
 }
 SECTIONS
 {
@@ -62,6 +63,9 @@ SECTIONS
/* 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 */
   . = ALIGN(16);
   __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET)
@@ -276,10 +280,6 @@ SECTIONS
   .debug_typenames 0 : { *(.debug_typenames) }
   .debug_varnames  0 : { *(.debug_varnames) }
   /* These must appear regardless of  .  */
-  /* Discard them for now since Intel SoftSDV cannot handle them.
-  .comment 0 : { *(.comment) }
-  .note 0 : { *(.note) }
-  */
   /DISCARD/ : { *(.comment) }
   /DISCARD/ : { *(.note) }
 }



Reply to: