Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-20 Thread Mike Frysinger
On Saturday, November 20, 2010 03:38:44 Wolfgang Denk wrote: > Mike Frysinger wrote: > > one possible way to fix boards is to stop specifying sub-objects in the > > linker script and only specify the combined ones. so in > > board/tqc/tqm8xx/u-boot.lds, drop the split objects like lib/zlib.o in >

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-20 Thread Albert ARIBAUD
Le 20/11/2010 09:38, Wolfgang Denk a écrit : > Dear Mike Frysinger, > > In message<201011191908.00162.vap...@gentoo.org> you wrote: >> sizes can be a bit large. if everyone was using -ffunction-sections/-fdata- >> sections > > ? Could you please complete that sentence? I believe the idea is th

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-20 Thread Wolfgang Denk
Dear Mike Frysinger, In message <201011191908.00162.vap...@gentoo.org> you wrote: > > the difference is that the linker wont bother looking at the duplicated > objects in the archives. from the linker's perspective though, we now have > to > completely independent objects. the combined one sp

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-19 Thread Mike Frysinger
On Friday, November 19, 2010 03:03:54 Wolfgang Denk wrote: > Albert ARIBAUD wrote: > > Most probably 2); mentioning a file in the linker script either with or > > without mentioning it on the command line has certainly been done for > > some time, so I doubt the feature is new; and certainly the do

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-19 Thread Wolfgang Denk
Dear Reinhard Meyer, In message <4ce676a6.10...@emk-elektronik.de> you wrote: > Have you tried something in the line of: > > /* Memory Definitions */ > > MEMORY > { > CODE (rx) : ORIGIN 0x, LENGTH 0x0007E000 > DATA (rw) : ORIGIN 0x4000, LENGTH 0x7A00 > ENET (rw) : ORIGIN 0x

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-19 Thread Albert ARIBAUD
Le 19/11/2010 14:07, Reinhard Meyer a écrit : > Dear Albert, >> >> On 2010-11-19 13:38:00, Albert ARIBAUD wrote: >>> Le 19/11/2010 13:33, Sebastien Carlier a écrit : Is it not possible to tell the linker to place a made-up 32 kB symbol within the text section at address 0x40008000? I am

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-19 Thread Reinhard Meyer
Dear Albert, > > On 2010-11-19 13:38:00, Albert ARIBAUD wrote: >> Le 19/11/2010 13:33, Sebastien Carlier a écrit : >>> Is it not possible to tell the linker to place a made-up 32 kB symbol >>> within the text section at address 0x40008000? I am not familiar enough >>> with ld to tell whether ther

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-19 Thread Sebastien Carlier
Dear Albert, On 2010-11-19 13:38:00, Albert ARIBAUD wrote: > > Le 19/11/2010 13:33, Sebastien Carlier a écrit : > > > >Is it not possible to tell the linker to place a made-up 32 kB symbol > >within the text section at address 0x40008000? I am not familiar enough > >with ld to tell whether there

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-19 Thread Wolfgang Denk
Dear Sebastien Carlier, In message you wrote: > > Is it not possible to tell the linker to place a made-up 32 kB symbol > within the text section at address 0x40008000? I am not familiar enough > with ld to tell whether there are restrictions for setting the absolute > address of a symbol that

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-19 Thread Albert ARIBAUD
Le 19/11/2010 13:33, Sebastien Carlier a écrit : > Dear Wolfgang, > > On 2010-11-19 12:11:12, Wolfgang Denk wrote: >> >> In message you >> wrote: >>> >> The used flash chips are so-called bootom boot sector types; using two >> chips in 16 bit config in parallel (to get a 32 bit bus) we see this >

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-19 Thread Sebastien Carlier
Dear Wolfgang, On 2010-11-19 12:11:12, Wolfgang Denk wrote: > > In message you > wrote: > > > The used flash chips are so-called bootom boot sector types; using two > chips in 16 bit config in parallel (to get a 32 bit bus) we see this > flash layout: > > Sector Start Addresses: > 400

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-19 Thread Albert ARIBAUD
Le 19/11/2010 12:48, Wolfgang Denk a écrit : > Dear Albert ARIBAUD, > > In message<4ce66215.2030...@free.fr> you wrote: >> >> There is a variant of this problem with many ARM boards, those based on >> Marvell SoCs for instance, which have a start address at 0x -- >> that's a 64K block the

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-19 Thread Wolfgang Denk
Dear Albert ARIBAUD, In message <4ce66215.2030...@free.fr> you wrote: > > There is a variant of this problem with many ARM boards, those based on > Marvell SoCs for instance, which have a start address at 0x -- > that's a 64K block the usage of which we want to maximize. Yes, that's bas

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-19 Thread Albert ARIBAUD
Le 19/11/2010 12:11, Wolfgang Denk a écrit : > Dear Sebastien Carlier, > > In message you > wrote: >> >> I am still not getting why the code needs to be split this way, rather >> than being a continuous segment followed by an environment sector. >> Whether the environment sector is in the middle

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-19 Thread Wolfgang Denk
Dear Sebastien Carlier, In message you wrote: > > I am still not getting why the code needs to be split this way, rather > than being a continuous segment followed by an environment sector. > Whether the environment sector is in the middle of the binary or > immediately after the binary does no

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-19 Thread Sebastien Carlier
Dear Wolfgang, On 2010-11-19 09:08:33, Wolfgang Denk wrote: > > In message you > wrote: > > > > It looks like the purpose is to optimally fill a flash sector with > > definitions, is this accurate? Why is this needed? Beside the obvious > > Correct. > > > (reset vectors, startup code), is t

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-19 Thread Mike Frysinger
On Friday, November 19, 2010 02:50:37 Sebastien Carlier wrote: > It looks like the purpose is to optimally fill a flash sector with > definitions, is this accurate? Why is this needed? Beside the obvious > (reset vectors, startup code), is there any reason to prefer any given > definition to go i

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-19 Thread Wolfgang Denk
Dear Sebastien Carlier, In message you wrote: > > It looks like the purpose is to optimally fill a flash sector with > definitions, is this accurate? Why is this needed? Beside the obvious Correct. > (reset vectors, startup code), is there any reason to prefer any given > definition to go in

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-19 Thread Sebastien Carlier
On 2010-11-19 07:36:05, Albert ARIBAUD wrote: > > Le 18/11/2010 23:33, Wolfgang Denk a écrit : > > > > I see two possible reasons: 1) whay you describe is a new feature in > > binutils 2.20; I'm currently using 2.17.50 (with ELDk 4.2); or 2) the > > linker does not realize it because it's actually

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-19 Thread Wolfgang Denk
Dear Albert ARIBAUD, In message <4ce61ad5.50...@free.fr> you wrote: > > Most probably 2); mentioning a file in the linker script either with or > without mentioning it on the command line has certainly been done for > some time, so I doubt the feature is new; and certainly the doc is about > fi

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-18 Thread Sebastien Carlier
Dear Wolfgang, On 2010-11-18 22:44:48, Wolfgang Denk wrote: > > > > Unfortunately I have not been able to reproduce these errors with the > > toolchain I am using (gcc 4.4.5 and binutils 2.20.1.20100303, based on > > emdebian squeeze packages). Can you please point me to the toolchain > > you ar

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-18 Thread Albert ARIBAUD
Le 18/11/2010 23:33, Wolfgang Denk a écrit : > Dear Albert ARIBAUD, > > In message<4ce5a3f1.50...@free.fr> you wrote: >> >>>58 arch/powerpc/cpu/mpc8xx/start.o (.text) >>>59 arch/powerpc/cpu/mpc8xx/traps.o (.text) >>>60 common/dlmalloc.o (.t

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-18 Thread Wolfgang Denk
Dear Albert ARIBAUD, In message <4ce5a3f1.50...@free.fr> you wrote: > > > 58 arch/powerpc/cpu/mpc8xx/start.o (.text) > > 59 arch/powerpc/cpu/mpc8xx/traps.o (.text) > > 60 common/dlmalloc.o (.text) > > 61 arch/powerpc/lib/ppcstring.o

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-18 Thread Albert ARIBAUD
Le 18/11/2010 22:44, Wolfgang Denk a écrit : > Dear Sebastien Carlier, > > In message<20101117133056.gb23...@safe.home.local> you wrote: >> >>> MPC8xx boards break with long lists of multiple definitions of >>> symbols, like that: >>> >>> Configuring for FPS860L board... >>> lib/libgeneric.o: In f

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-18 Thread Wolfgang Denk
Dear Sebastien Carlier, In message <20101117133056.gb23...@safe.home.local> you wrote: > > > MPC8xx boards break with long lists of multiple definitions of > > symbols, like that: > > > > Configuring for FPS860L board... > > lib/libgeneric.o: In function `vsprintf': > > /home/wd/git/u-boot/work/

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-17 Thread Mike Frysinger
On Wednesday, November 17, 2010 14:53:33 Sebastien Carlier wrote: > On 2010-11-17 13:06:49, Mike Frysinger wrote: > > On Wednesday, November 17, 2010 08:30:56 Sebastien Carlier wrote: > > > The size increase you noted seems to completely go away when adding > > > --gc-sections to LDFLAGS, but this

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-17 Thread Sebastien Carlier
Dear Mike, On 2010-11-17 13:06:49, Mike Frysinger wrote: > On Wednesday, November 17, 2010 08:30:56 Sebastien Carlier wrote: > > On 2010-11-15 11:54:07, Wolfgang Denk wrote: > > > I notice that the patch affects the size of the resulting U-Boot > > > images. > > > > The size increase you noted se

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-17 Thread Mike Frysinger
On Wednesday, November 17, 2010 08:30:56 Sebastien Carlier wrote: > On 2010-11-15 11:54:07, Wolfgang Denk wrote: > > I notice that the patch affects the size of the resulting U-Boot > > images. > > The size increase you noted seems to completely go away when adding > --gc-sections to LDFLAGS, but

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-17 Thread Wolfgang Denk
Dear Sebastien Carlier, In message <20101117133056.gb23...@safe.home.local> you wrote: > > Unfortunately I have not been able to reproduce these errors with the > toolchain I am using (gcc 4.4.5 and binutils 2.20.1.20100303, based on > emdebian squeeze packages). Can you please point me to the t

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-17 Thread Sebastien Carlier
Dear Wolfgang, On 2010-11-15 11:54:07, Wolfgang Denk wrote: > > I notice that the patch affects the size of the resulting U-Boot > images. The size increase you noted seems to completely go away when adding --gc-sections to LDFLAGS, but this option apparently brings its own issues when the linke

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-15 Thread Mike Frysinger
On Monday, November 15, 2010 03:09:50 Sebastien Carlier wrote: > On 2010-11-15 08:51:29, Wolfgang Denk wrote: > > In message <20101110080708.ga8...@safe.home.local> you wrote: > > > Good suggestion, done in v3: > > I have to admit that I lost a bit of overview of the current state of > > this work.

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-15 Thread Mike Frysinger
On Monday, November 15, 2010 07:38:28 Mike Frysinger wrote: > some of this is simply due to change in linking order and the implicit > padding in between each symbol for alignment requirements > > you can check how much this adds with the attached script: this version fixes handling with defined

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-15 Thread Mike Frysinger
On Monday, November 15, 2010 07:38:28 Mike Frysinger wrote: > replace the '$7 == "3"' check with whatever section number you want to > check. in my case, 3 is ".text". err, ignore this outdated comment -mike signature.asc Description: This is a digitally signed message part.

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-15 Thread Mike Frysinger
On Monday, November 15, 2010 06:33:40 Mike Frysinger wrote: > On Monday, November 15, 2010 05:54:07 Wolfgang Denk wrote: > > Sebastien Carlier wrote: > > > I just uploaded the revised patch here: > > > http://www.denx.de/wiki/pub/U-Boot/TooBigPatches/0001-Switch-from- arch > > > iv e-libraries-

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-15 Thread Mike Frysinger
On Monday, November 15, 2010 05:54:07 Wolfgang Denk wrote: > Sebastien Carlier wrote: > > I just uploaded the revised patch here: > > http://www.denx.de/wiki/pub/U-Boot/TooBigPatches/0001-Switch-from-archiv > > e-libraries-to-partial-linking-v4.patch > > > > Version 4: > > Bring in Linux

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-15 Thread Wolfgang Denk
Dear Sebastien Carlier, In message <20101115080950.ga26...@safe.home.local> you wrote: > > I just uploaded the revised patch here: > > > http://www.denx.de/wiki/pub/U-Boot/TooBigPatches/0001-Switch-from-archive-libraries-to-partial-linking-v4.patch > > Version 4: > Bring in Linux comme

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-15 Thread Sebastien Carlier
Dear Wolfgang, On 2010-11-15 08:51:29, Wolfgang Denk wrote: > > In message <20101110080708.ga8...@safe.home.local> you wrote: > > > Good suggestion, done in v3: > > I have to admit that I lost a bit of overview of the current state of > this work. My understanding is that you are preparing a n

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-14 Thread Wolfgang Denk
Dear Sebastien Carlier, In message <20101110080708.ga8...@safe.home.local> you wrote: > Good suggestion, done in v3: I have to admit that I lost a bit of overview of the current state of this work. My understanding is that you are preparing a new version (V4 ?) of this patch? If yes, do you ha

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-10 Thread Mike Frysinger
On Wednesday, November 10, 2010 07:24:51 Sebastien Carlier wrote: > I was wondering whether config.mk is the right place for this function; > would it be better in rules.mk instead? Both config.mk and rules.mk end > up being included in all Makefile's. for now, keep it with the other compiler tar

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-10 Thread Mike Frysinger
On Wednesday, November 10, 2010 03:07:08 Sebastien Carlier wrote: > On 2010-11-10 01:57:30, Mike Frysinger wrote: > > the config.mk looks weird: > > +cmd_link_o_target = $(if $(strip $1),\ > > + $(LD) -r -o $@ $1 ,\ > > + rm -f $@; $(AR) rcs $@ ) > > > > w

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-10 Thread Sebastien Carlier
On 2010-11-10 03:55:21, Mike Frysinger wrote: > On Wednesday, November 10, 2010 03:07:08 Sebastien Carlier wrote: > > On 2010-11-10 01:57:30, Mike Frysinger wrote: > > > the config.mk looks weird: > > > +cmd_link_o_target = $(if $(strip $1),\ > > > + $(LD) -r -o $@ $1 ,\ > > >

Re: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking

2010-11-10 Thread Sebastien Carlier
Dear Mike, On 2010-11-10 01:57:30, Mike Frysinger wrote: > > On Monday, November 08, 2010 17:04:32 Sebastien Carlier wrote: > > This commit changes all Makefiles to use partial linking (ld -r) instead of > > creating library archives, which forces all symbols to participate in > > linking, allowi