This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] -z relro + .dynsym STT_SECTION


On Tue, Jun 15, 2004 at 05:12:39PM +0200, Eric Botcazou wrote:
> > This is not what current ld uses.
> > The current layout is:
> >   ${OTHER_READONLY_SECTIONS}
> >   .eh_frame_hdr : { *(.eh_frame_hdr) }
> >   .eh_frame     ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.eh_frame)) }
> >   .gcc_except_table ${RELOCATING-0} : ONLY_IF_RO { *(.gcc_except_table) }
> > END OF RO SEGMENT
> > START OF RW SEGMENT
> >   /* Exception handling  */
> >   .eh_frame     ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.eh_frame)) }
> >   .gcc_except_table ${RELOCATING-0} : ONLY_IF_RW { *(.gcc_except_table) }
> >
> >   /* Thread Local Storage sections  */
> >   .tdata        ${RELOCATING-0} : { *(.tdata${RELOCATING+ .tdata.*
> > .gnu.linkonce.td.*}) } .tbss         ${RELOCATING-0} : {
> > *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+
> > *(.tcommon)} } ...
> >
> > Can you reproduce it even with current linker?
> 
> Yes.  The KEEP and the .gcc_except_table.* were killed by your patch and we 
> need both.

I had to apply the -z relro patch by hand and clearly I have missed your
recent changes (well, I have missed it even in the mail you just posted).
Sorry, committed as obvious:

2004-06-15  Jakub Jelinek  <jakub@redhat.com>

	* scripttempl/elf.sc: Readd KEEP and .gcc_except_table.* to
	.gcc_except_table output sections lost accidentally with
	-z relro patch.

--- ld/scripttempl/elf.sc.jj	2004-05-19 15:59:47.000000000 +0200
+++ ld/scripttempl/elf.sc	2004-06-15 17:14:11.073742753 +0200
@@ -312,7 +312,7 @@ cat <<EOF
   ${OTHER_READONLY_SECTIONS}
   .eh_frame_hdr : { *(.eh_frame_hdr) }
   .eh_frame     ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.eh_frame)) }
-  .gcc_except_table ${RELOCATING-0} : ONLY_IF_RO { *(.gcc_except_table) }
+  .gcc_except_table ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) }
 
   /* Adjust the address for the data segment.  We want to adjust up to
      the same address within the page on the next page up.  */
@@ -322,7 +322,7 @@ cat <<EOF
 
   /* Exception handling  */
   .eh_frame     ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.eh_frame)) }
-  .gcc_except_table ${RELOCATING-0} : ONLY_IF_RW { *(.gcc_except_table) }
+  .gcc_except_table ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) }
 
   /* Thread Local Storage sections  */
   .tdata	${RELOCATING-0} : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) }


	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]