[PATCH][URGENT] kernel/vmlinux.lds.S: Handle note sections

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

 



 Store any note sections after the exception tables like the other 
architectures do.  This is required for .note.gnu.build-id emitted from 
binutils 2.18 onwards if nothing else.

Signed-off-by: Maciej W. Rozycki <macro@xxxxxxxxxxxxxx>
---
Ralf,

 Without it a binary with a layout like this is created:

$ readelf -l vmlinux

Elf file type is EXEC (Executable file)
Entry point 0xffffffff804cc000
There are 3 program headers, starting at offset 64

Program Headers:
  Type           Offset             VirtAddr           PhysAddr
                 FileSiz            MemSiz              Flags  Align
  LOAD           0x00000000000000e8 0x0000000000000000 0x0000000000000000
                 0x0000000000000024 0x0000000000000024  R      4
  LOAD           0x0000000000004000 0xffffffff80040000 0xffffffff80040000
                 0x00000000004bead8 0x0000000000642980  RWE    4000
  NOTE           0x00000000000000e8 0x0000000000000000 0x0000000000000000
                 0x0000000000000024 0x0000000000000024  R      4

 Section to Segment mapping:
  Segment Sections...
   00     .note.gnu.build-id 
   01     .text __ex_table __dbe_table .rodata __ksymtab __ksymtab_gpl __ksymtab_strings __param .data .data.cacheline_aligned .init.text .init.data .init.setup .initcall.init .con_initcall.init .exit.text .bss 
   02     .note.gnu.build-id 

which does not quite work as the first segment is in the KUSEG.

 Please apply ASAP.

  Maciej

patch-mips-2.6.23-rc5-20070904-mips-notes-0
diff -up --recursive --new-file linux-mips-2.6.23-rc5-20070904.macro/arch/mips/kernel/vmlinux.lds.S linux-mips-2.6.23-rc5-20070904/arch/mips/kernel/vmlinux.lds.S
--- linux-mips-2.6.23-rc5-20070904.macro/arch/mips/kernel/vmlinux.lds.S	2007-09-04 04:55:19.000000000 +0000
+++ linux-mips-2.6.23-rc5-20070904/arch/mips/kernel/vmlinux.lds.S	2007-10-01 04:16:44.000000000 +0000
@@ -45,6 +45,8 @@ SECTIONS
   __dbe_table : { *(__dbe_table) }
   __stop___dbe_table = .;
 
+  NOTES
+
   RODATA
 
   /* writeable */


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux