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@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel

Reply via email to