WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

Re: [XenPPC] PHDR link failure testcase

I believe the root cause for this is the fact that the .data.percpu
section is becoming large.

Yeah, something like that.  If you don't have an explicit PHDRS
statement in your linker script, ld guesses, and it guesses wrong
in many (most) non-trivial examples.

1) Explicitly add 3 segmnets in the linker script and manually map
   sections to segments.

Yep, that's the way to go.

+PHDRS
+{
+  text  PT_LOAD FILEHDR PHDRS;
+  data  PT_LOAD;
+  extra PT_LOAD;
+}
 SECTIONS
 {
   /* Read-only sections, merged into text segment: */
PROVIDE (__executable_start = 0x10000000); . = 0x10000000 + SIZEOF_HEADERS;
-  .interp         : { *(.interp) }
+  .interp         : { *(.interp) } :text

That's how it's done, looks good.  I haven't checked the details
though, look at the resulting image with readelf to check if
everything is exactly as you want it to be ;-)


Segher


_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel