Re: [XenPPC] PHDR link failure testcase

2006-08-17 Thread Hollis Blanchard
On Thu, 2006-08-17 at 07:17 -0400, Jimi Xenidis wrote: > > > Anyone else with cleanups for xen.lds.S ? > > We could prolly get it down to 10 lines :) but I suppose we canleave > it cuz it works. I took the default linker script (ld -verbose) and added only what was needed for Xen, and that in

Re: [XenPPC] PHDR link failure testcase

2006-08-17 Thread Jimi Xenidis
On Aug 17, 2006, at 1:24 AM, Tony Breeds wrote: On Wed, Aug 16, 2006 at 10:23:08PM -0400, Jimi Xenidis wrote: /* Read-only sections, merged into text segment: */ PROVIDE (__executable_start = 0x1000); . = 0x1000 + SIZEOF_HEADERS; Actually the above line should just be: PROVIDE

Re: [XenPPC] PHDR link failure testcase

2006-08-16 Thread Tony Breeds
On Wed, Aug 16, 2006 at 10:23:08PM -0400, Jimi Xenidis wrote: > Not really its not like we protect any of it :) and the section > separation still exits > after-all we all (kernels/xen) link with -N/--omagic, which does not > page align the data sections which has always implied a single PHDR.

Re: [XenPPC] PHDR link failure testcase

2006-08-16 Thread Jimi Xenidis
On Aug 16, 2006, at 10:00 PM, Tony Breeds wrote: On Wed, Aug 16, 2006 at 08:10:20AM -0400, Jimi Xenidis wrote: Thanks for getting to the bottom of this Tony. As it's empty the linker decides to start a 3rd segment rather than waste disk space. Hmm, what is "empty"? By empty I mean "fill

Re: [XenPPC] PHDR link failure testcase

2006-08-16 Thread Tony Breeds
On Wed, Aug 16, 2006 at 08:10:20AM -0400, Jimi Xenidis wrote: > Thanks for getting to the bottom of this Tony. > > >As it's empty the linker decides to start a > >3rd segment rather than waste disk space. > > Hmm, what is "empty"? By empty I mean "filled with 0s", which I believe is because all

Re: [XenPPC] PHDR link failure testcase

2006-08-16 Thread Segher Boessenkool
Perhaps, this is just mythology/warm-n-fuzzy for me, but I really like having 1 PHDR. Lemmy collect my thoughts and come up with a rational reason. 1 PHDR works just as well; the important thing is to explicitly define your PHDRs in the linker script. Segher ___

Re: [XenPPC] PHDR link failure testcase

2006-08-16 Thread Jimi Xenidis
On Aug 15, 2006, at 2:41 AM, Tony Breeds wrote: On Mon, Aug 14, 2006 at 07:17:37PM -0400, Amos Waterland wrote: Using a `powerpc64-linux-gcc (GCC) 4.1.1 ()' x86->ppc toolchain, if I do this: diff -r 9563f5c9ab19 xen/include/asm-powerpc/config.h /usr/powerpc64/lib/gcc/powerpc64-linux/4.1

Re: [XenPPC] PHDR link failure testcase

2006-08-15 Thread Tony Breeds
On Tue, Aug 15, 2006 at 07:46:53PM +0200, Segher Boessenkool wrote: > 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 ;-) From: Tony Breeds <[EMAIL PROTECTED]> This patch

Re: [XenPPC] PHDR link failure testcase

2006-08-15 Thread Segher Boessenkool
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

Re: [XenPPC] PHDR link failure testcase

2006-08-14 Thread Tony Breeds
On Mon, Aug 14, 2006 at 07:17:37PM -0400, Amos Waterland wrote: > Using a `powerpc64-linux-gcc (GCC) 4.1.1 ()' x86->ppc toolchain, if I do this: > > diff -r 9563f5c9ab19 xen/include/asm-powerpc/config.h > /usr/powerpc64/lib/gcc/powerpc64-linux/4.1.1/../../../../powerpc64-linux/bin/ld: > /home/

[XenPPC] PHDR link failure testcase

2006-08-14 Thread Amos Waterland
Using a `powerpc64-linux-gcc (GCC) 4.1.1 ()' x86->ppc toolchain, if I do this: diff -r 9563f5c9ab19 xen/include/asm-powerpc/config.h --- a/xen/include/asm-powerpc/config.h Mon Aug 14 15:22:22 2006 -0500 +++ b/xen/include/asm-powerpc/config.h Mon Aug 14 19:13:07 2006 -0400 @@ -51,7 +51,7 @@ exter