Re: PATCH: Fix gnu-efi-3.0b-041222 for ia32

From: H. J. Lu <hjl_at_lucon.org>
Date: 2006-03-18 10:31:18
On Fri, Mar 17, 2006 at 03:15:48PM -0800, James E Wilson wrote:
> On Fri, 2006-03-17 at 13:52, H. J. Lu wrote:
> >     *(.gnu.linkonce.t*)
> 
> This isn't something you added, but should be fixed just the same.  This
> will accidentally cause some thread-local data sections to be merged
> into the text section.  The thread-local sections may not have existed
> when this code was written, but they do now.  .gnu.linkonce.td.* is used
> for linkonce thread local data, and .gnu.linkonce.tb.* is used for
> linkonce thread local bss.

I guess we never used TLS in EFI applications before. It doesn't
really matter since TLS needs more than the linker script change.
Here is the new patch.


H.J.
---
--- gnu-efi/gnuefi/elf_ia32_efi.lds.ia32	2004-12-22 07:52:28.000000000 -0800
+++ gnu-efi/gnuefi/elf_ia32_efi.lds	2006-03-17 13:48:13.000000000 -0800
@@ -10,6 +10,12 @@ SECTIONS
   .text :
   {
    *(.text)
+   *(.text.*)
+   *(.gnu.linkonce.t.*)
+  }
+  .reloc :
+  {
+   *(.reloc)
   }
   . = ALIGN(4096);
   .data :
@@ -48,12 +54,9 @@ SECTIONS
   . = ALIGN(4096);
   .dynstr   : { *(.dynstr) }
   . = ALIGN(4096);
-  .ignored.reloc :
+  /DISCARD/ :
   {
     *(.rel.reloc)
-  }
-  .ignored :
-  {
     *(.eh_frame)
   }
 }
--- gnu-efi/gnuefi/elf_ia64_efi.lds.ia32	2004-12-22 10:18:10.000000000 -0800
+++ gnu-efi/gnuefi/elf_ia64_efi.lds	2006-03-17 15:27:48.000000000 -0800
@@ -10,7 +10,8 @@ SECTIONS
   .text :
   {
    *(.text)
-   *(.gnu.linkonce.t*)
+   *(.text.*)
+   *(.gnu.linkonce.t.*)
   }
   . = ALIGN(4096);
   __gp = ALIGN (8) + 0x200000;
@@ -59,13 +60,10 @@ SECTIONS
   .dynsym   : { *(.dynsym) }
   . = ALIGN(4096);
   .dynstr   : { *(.dynstr) }
-  .ignored_reloc :
+  /DISCARD/ :
   {
     *(.rela.plabel)
     *(.rela.reloc)
-  }
-  /DISCARD/ :
-  {
     *(.IA_64.unwind*)
     *(.IA64.unwind*)
   }
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Sat Mar 18 10:33:38 2006

This archive was generated by hypermail 2.1.8 : 2006-03-18 10:33:46 EST