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 &g

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 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 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-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

[U-Boot] [PATCH] Exclude drivers/qe/fdt.c without CONFIG_QE

2010-11-18 Thread Sebastien Carlier
Previously with archive libraries fdt.o was compiled and included in qe.a and then discarded by the linker. With partial linking this results in unresolved symbols, which this commit fixes. This commit also cleans up a now-useless conditional in fdt.c. Signed-off-by: Sebastien Carlier

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. > >

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] still an issue ?? - Can't get strong symbol to override weak one

2010-11-17 Thread Sebastien Carlier
Dear Joachim, On 2010-11-17 11:38:54, Joachim Rahn wrote: > > Hi all, > > I've ported u-boot to our ARM board based on at91sam9263. > > When I try to use the LED functions I have problems getting > strong symbols overriden by weak ones. > > I'm just stumbling upon the archive entries > h

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

2010-11-15 Thread Sebastien Carlier
On 2010-11-15 11:54:07, Wolfgang Denk wrote: > > I notice that the patch affects the size of the resulting U-Boot > images. > > For example: > > Configuring for MiniFAP - Board: TQM5200, Options: MINIFAP >textdata bss dec hex filename > 358144 35208 303248 696600 aa118

Re: [U-Boot] [PATCH V4 1/2] arm926ejs: fix linker file for newer ld support

2010-11-15 Thread Sebastien Carlier
the attached patch? It fixed this problem for me. -- Sebastien >From f4007bb3d05768bbe5c0903f856809618a89e921 Mon Sep 17 00:00:00 2001 From: Sebastien Carlier Date: Wed, 10 Nov 2010 14:41:44 +0100 Subject: [PATCH] arm920t: add .plt and .rel.plt to the linker script Signed-off-by: Sebastien Car

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

2010-11-15 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. > > For example: > > Configuring for MiniFAP - Board: TQM5200, Options: MINIFAP >textdata bss dec hex filename > 358144 35208 303248

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-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),\ > > > +

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 particip

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

2010-11-09 Thread Sebastien Carlier
Dear André, On 2010-11-09 10:15:31, Andre Schwarz wrote: > Date: Tue, 09 Nov 2010 10:15:31 +0100 > From: Andre Schwarz > To: Sebastien Carlier > CC: u-boot@lists.denx.de, Timur Tabi , > Kim Phillips > Subject: Re: [U-Boot] [PATCH] Switch from archive libraries to

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

2010-11-08 Thread Sebastien Carlier
On Mon, Nov 8, 2010 at 11:10 PM, Graeme Russ wrote: > On Tue, Nov 9, 2010 at 9:04 AM, Sebastien Carlier > wrote: >> NOTE: This does not include the actual patch as it is too large for the >> mailing list (418 kB). >> > > A link to the matching patch would hav

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

2010-11-08 Thread Sebastien Carlier
updates references accordingly where needed, in particular in some linker scripts. This commit reveals board configurations that exclude some module but not all of its dependencies; for example, disabling CMD_NET but not CMD_NFS results in undefined symbols at link time. Signed-off-by: Se

Re: [U-Boot] [PATCH] Switch from library archives to partial linking

2010-11-07 Thread Sebastien Carlier
to automatically check that a configuration is meaningful? Best regards, Sebastien Carlier ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Re: [U-Boot] [PATCH] Switch from library archives to partial linking

2010-11-07 Thread Sebastien Carlier
ble be put in a new header file; would config_checks.h be an ok name for it? I suppose there might be other cases where a module (that is included by default) needs to be excluded when one of its dependencies is disabled. Regards, Sebastien Carlier ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

[U-Boot] [PATCH] Switch from library archives to partial linking

2010-11-06 Thread Sebastien Carlier
/nfs.o from being compiled and causing undefined symbols. -- Sebastien Carlier ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Re: [U-Boot] Weak symbols: request for comments

2010-11-05 Thread Sebastien Carlier
nstead-of-building-library-arch.patch.bz2 I am not posting the patch directly to the list because it is rather large. Feedback is very welcome! Best regards, Sebastien Carlier ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Re: [U-Boot] Weak symbols: request for comments

2010-11-05 Thread Sebastien Carlier
Dear Wolfgang, On 11/05/2010 01:23 PM, Wolfgang Denk wrote: > Dear Sebastien Carlier, > > In message<4cd3f58f.8090...@gmail.com> you wrote: > >> It does seem like weak symbols were designed with other uses in mind, >> such as C++ class members defined within a

Re: [U-Boot] Weak symbols: request for comments

2010-11-05 Thread Sebastien Carlier
and do what Linux does > instead is the way to go. > Partial linking with ld -r ? That does seem like a fairly simple change. Regards, Sebastien Carlier ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Re: [U-Boot] Weak symbols: request for comments

2010-11-05 Thread Sebastien Carlier
etter options? Which one would you prefer to see >> implemented? >> > Yes. The old-fashioned #define CONFIG_BOARD_INIT_F and friends > method. I would prefer that one. Its not beautiful but still > widely used and bullet-proof. >

[U-Boot] Weak symbols: request for comments

2010-11-05 Thread Sebastien Carlier
spi_cs_deactivate spi_cs_is_valid system_map -- Sebastien Carlier ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Re: [U-Boot] [PATCH v2 1/2] arm920t/at91/reset.c: fix weak reset_board()

2010-11-04 Thread Sebastien Carlier
On Thu, Nov 4, 2010 at 11:54 AM, Andreas Bießmann wrote: > > --->8--- > __LIBS := $(subst $(obj),,$(LIBBOARD)) $(subst $(obj),,$(LIBS)) > ---8<--- Still, why would the linker pull definitions from libboard.a? Library archive are only searched by the linker to resolved undefined definitions. Wea

Re: [U-Boot] [PATCH v2 1/2] arm920t/at91/reset.c: fix weak reset_board()

2010-11-03 Thread Sebastien Carlier
some ld versions (at least with 2.20.1), ld creates PLT entries for undefined weak symbols and crashes when the PLT-related sections (.plt, .got.plt, and .rel.plt) are discarded... -- Sebastien Carlier ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Re: [U-Boot] arm920t: implement elf relocation

2010-11-02 Thread Sebastien Carlier
Hello all, I am trying to get the ELF relocation working with the arm920t, and I have applied the patch recently posted to the list by Andreas Bießmann. I found that adding these two sections to the linker script gets rid of both assert failures:         .plt : { *(.plt) }         .rel.plt : { *