* [U-Boot-Users] maybe just one more bug left in building the examples directory in 1.1.2 @ 2005-11-15 10:52 John Davis 2005-11-15 11:38 ` Wolfgang Denk 0 siblings, 1 reply; 11+ messages in thread From: John Davis @ 2005-11-15 10:52 UTC (permalink / raw) To: u-boot Hello I am getting closer to getting the examples code to build. I have added a bunch of object files and library files to the link command in the examples Makefile. However, I have gotten to the last bug and I don't know how to solve it. Below, it complains about __got2_entries. I found this defined in our board directories linker script. The current command line and results: make[1]: Entering directory `/home/davis/cvs/mcp4/uboot/mine/u-boot-1.1.2 /examples' ppc-linux-ld -g -Ttext 0x40000 \ -o hello_world -e hello_world hello_world.o libstubs.a \ /home/davis/cvs/mcp4/uboot/mine/u-boot-1.1.2/cpu/ppc4xx/start.o \ /home/davis/cvs/mcp4/uboot/mine/u-boot-1.1.2/board/fsp1/fsp1_pra.o \ /home/davis/cvs/mcp4/uboot/mine/u-boot-1.1.2/board/fsp1/eddr2.o \ -L/home/davis/cvs/mcp4/uboot/mine/u-boot-1.1.2/common -lcommon \ -L/home/davis/cvs/mcp4/uboot/mine/u-boot-1.1.2/lib_generic -lgeneric \ -L/home/davis/cvs/mcp4/uboot/mine/u-boot-1.1.2/net -lnet \ -L/home/davis/cvs/mcp4/uboot/mine/u-boot-1.1.2/rtc -lrtc \ -L/home/davis/cvs/mcp4/uboot/mine/u-boot-1.1.2/board/fsp1 -lfsp1 \ -L/home/davis/cvs/mcp4/uboot/mine/u-boot-1.1.2/cpu/ppc4xx -lppc4xx \ -L/home/davis/cvs/mcp4/uboot/mine/u-boot-1.1.2/lib_ppc -lppc \ -L/opt/fld_fakeroot/opt/mcp/ppc/bin/../lib/gcc-lib/ppc-linux/3.3.3 -lgcc /home/davis/cvs/mcp4/uboot/mine/u-boot-1.1.2 /cpu/ppc4xx/start.o(.text+0x25ae):/home/davis/cvs/mcp4/uboot/mine/u- boot-1.1.2/cpu/ppc4xx/start.S:1374: undefined reference to `__got2_entries' ppc-linux-ld: BFD 2.15.90.0.1.1 20040303 (SuSE Linux) assertion fail ../../bfd/elf32-ppc.c:5645 make[1]: *** [hello_world] Segmentation fault make[1]: *** Deleting file `hello_world' make[1]: Leaving directory `/home/davis/cvs/mcp4/uboot/mine/u-boot-1.1.2 /examples' make: *** [examples] Error 2 [davis at dyn-9-152-249-44 u-boot-1.1.2]$ The relevant portion of the linker script which defines the __got2_entries variable. board/fsp1/u-boot.lds: ... stuff snipped __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; ... stuff snipped Any advice on how to apply this to my makefile is appreciated. JD -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.denx.de/pipermail/u-boot/attachments/20051115/cd9fb1c1/attachment.htm ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] maybe just one more bug left in building the examples directory in 1.1.2 2005-11-15 10:52 [U-Boot-Users] maybe just one more bug left in building the examples directory in 1.1.2 John Davis @ 2005-11-15 11:38 ` Wolfgang Denk 2005-11-15 13:04 ` John Davis 2006-03-08 11:26 ` Jörn Engel 0 siblings, 2 replies; 11+ messages in thread From: Wolfgang Denk @ 2005-11-15 11:38 UTC (permalink / raw) To: u-boot Dear John, in message <6a7ac2300511150252w60601196qea018696ae5d1813@mail.gmail.com> you wrote: > > I am getting closer to getting the examples code to build. I have added a > bunch of object files and library files to the link command in the examples > Makefile. However, I really, really don't understand what you are actually doing. If you put your code in the examples directory, then just adding the binary name to the "BIN" definition in the "examples/Makefile" is *all* you have to do to get it build correctly. If you prefer to keep the code in your own board directory (which is a much better approach, especially if you intend to submit it as a patch) then just have a look at the trab_fkt* targets in the "board/trab/Makefile". Nothing more needs to be done. Really. If this does not work for you, then your toolchain is broken and should be replaced. > I have gotten to the last bug and I don't know how to solve it. Below, it "the last bug" ??? Famous last words. > complains about __got2_entries. I found this defined in our board .... > ppc-linux-ld: BFD 2.15.90.0.1.1 20040303 (SuSE Linux) assertion fail > ../../bfd/elf32-ppc.c:5645 > make[1]: *** [hello_world] Segmentation fault Your tool crashes with a segmentation fault. That's a tolchain problem. Get yourself working tools and forget about all this trouble. Best regards, Wolfgang Denk -- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Compassion -- that's the one things no machine ever had. Maybe it's the one thing that keeps men ahead of them. -- McCoy, "The Ultimate Computer", stardate 4731.3 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] maybe just one more bug left in building the examples directory in 1.1.2 2005-11-15 11:38 ` Wolfgang Denk @ 2005-11-15 13:04 ` John Davis 2005-11-15 14:10 ` Andrew Wozniak 2005-11-15 14:43 ` Wolfgang Denk 2006-03-08 11:26 ` Jörn Engel 1 sibling, 2 replies; 11+ messages in thread From: John Davis @ 2005-11-15 13:04 UTC (permalink / raw) To: u-boot Hello Wolfgang, Ok. Thank you for the reality check. Could you please tell me where i can get a reliable toolchain so I can end my frustration? FWIW, I am not currently adding new code, I am just trying to get the existing examples directory to build. I talked to my more knowledgeble co-worker and he told me that my approach was not what I wanted anyway. By statically linking to the libraries as I have done, I am not created a loadable applet which is my main goal. Many thanks in advance, JD On 11/15/05, Wolfgang Denk <wd@denx.de> wrote: > > Dear John, > > in message <6a7ac2300511150252w60601196qea018696ae5d1813@mail.gmail.com> > you wrote: > > > > I am getting closer to getting the examples code to build. I have added > a > > bunch of object files and library files to the link command in the > examples > > Makefile. However, > > I really, really don't understand what you are actually doing. If you > put your code in the examples directory, then just adding the binary > name to the "BIN" definition in the "examples/Makefile" is *all* you > have to do to get it build correctly. > > If you prefer to keep the code in your own board directory (which is > a much better approach, especially if you intend to submit it as a > patch) then just have a look at the trab_fkt* targets in the > "board/trab/Makefile". > > Nothing more needs to be done. Really. > > If this does not work for you, then your toolchain is broken and > should be replaced. > > > I have gotten to the last bug and I don't know how to solve it. Below, > it > > "the last bug" ??? Famous last words. > > > complains about __got2_entries. I found this defined in our board > .... > > ppc-linux-ld: BFD 2.15.90.0.1.1 20040303 (SuSE Linux) assertion fail > > ../../bfd/elf32-ppc.c:5645 > > make[1]: *** [hello_world] Segmentation fault > > Your tool crashes with a segmentation fault. That's a tolchain > problem. Get yourself working tools and forget about all this > trouble. > > Best regards, > > Wolfgang Denk > > -- > Software Engineering: Embedded and Realtime Systems, Embedded Linux > Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de > Compassion -- that's the one things no machine ever had. Maybe it's > the one thing that keeps men ahead of them. > -- McCoy, "The Ultimate Computer", stardate 4731.3 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.denx.de/pipermail/u-boot/attachments/20051115/db232547/attachment.htm ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] maybe just one more bug left in building the examples directory in 1.1.2 2005-11-15 13:04 ` John Davis @ 2005-11-15 14:10 ` Andrew Wozniak 2005-11-15 14:43 ` Wolfgang Denk 1 sibling, 0 replies; 11+ messages in thread From: Andrew Wozniak @ 2005-11-15 14:10 UTC (permalink / raw) To: u-boot Andrew Wozniak | Mercury Computer Systems 978.967.1895 | System SW, ICS Group John Davis wrote: > Hello Wolfgang, > > Ok. Thank you for the reality check. Could you please tell me where i > can get a reliable toolchain so I can end my frustration? > > FWIW, I am not currently adding new code, I am just trying to get the > existing examples directory to build. I talked to my more knowledgeble > co-worker and he told me that my approach was not what I wanted anyway. > By statically linking to the libraries as > I have done, I am not created a loadable applet which is my main goal. Your co-worker is correct. The U-Boot examples are loadable applets which use the U-Boot application binary interface (ABI) to access U-Boot library functions. The #include <exports.h> entry within hello_world.c defines which library functions are provided by U-Boot. Since the ABI is used by the examples, you SHOULD NOT attempt to link in generic or other libraries! The example code and makefiles have worked for quite some time now - forget about trying to fix something that is not broken. Instead, focus on your toolchain as suggested Wolfgang. > Many thanks in advance, > > JD > > > On 11/15/05, *Wolfgang Denk* <wd at denx.de <mailto:wd@denx.de>> wrote: > > Dear John, > > in message < > 6a7ac2300511150252w60601196qea018696ae5d1813 at mail.gmail.com > <mailto:6a7ac2300511150252w60601196qea018696ae5d1813@mail.gmail.com>> > you wrote: > > > > I am getting closer to getting the examples code to build. I > have added a > > bunch of object files and library files to the link command in > the examples > > Makefile. However, > > I really, really don't understand what you are actually doing. If you > put your code in the examples directory, then just adding the binary > name to the "BIN" definition in the "examples/Makefile" is *all* you > have to do to get it build correctly. > > If you prefer to keep the code in your own board directory (which is > a much better approach, especially if you intend to submit it as a > patch) then just have a look at the trab_fkt* targets in the > "board/trab/Makefile". > > Nothing more needs to be done. Really. > > If this does not work for you, then your toolchain is broken and > should be replaced. > > > I have gotten to the last bug and I don't know how to solve it. > Below, it > > "the last bug" ??? Famous last words. > > > complains about __got2_entries. I found this defined in our board > .... > > ppc-linux-ld: BFD 2.15.90.0.1.1 20040303 (SuSE Linux) assertion fail > > ../../bfd/elf32-ppc.c:5645 > > make[1]: *** [hello_world] Segmentation fault > > Your tool crashes with a segmentation fault. That's a tolchain > problem. Get yourself working tools and forget about all this > trouble. > > Best regards, > > Wolfgang Denk > > -- > Software Engineering: Embedded and Realtime Systems, Embedded Linux > Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: > wd at denx.de <mailto:wd@denx.de> > Compassion -- that's the one things no machine ever had. Maybe it's > the one thing that keeps men ahead of them. > -- McCoy, "The Ultimate Computer", stardate 4731.3 > > ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] maybe just one more bug left in building the examples directory in 1.1.2 2005-11-15 13:04 ` John Davis 2005-11-15 14:10 ` Andrew Wozniak @ 2005-11-15 14:43 ` Wolfgang Denk 2005-11-15 14:47 ` John Davis 1 sibling, 1 reply; 11+ messages in thread From: Wolfgang Denk @ 2005-11-15 14:43 UTC (permalink / raw) To: u-boot In message <6a7ac2300511150504x6bbb8bd8pa998bcf2ddaa19f4@mail.gmail.com> you wrote: > > Ok. Thank you for the reality check. Could you please tell me where i can > get a reliable toolchain so I can end my frustration? ELDK? See http://www.denx.de/wiki/view/DULG/ELDKAvailability Best regards, Wolfgang Denk -- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Brontosaurus Principle: Organizations can grow faster than their brains can manage them in relation to their environment and to their own physiology: when this occurs, they are an endangered species. - Thomas K. Connellan ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] maybe just one more bug left in building the examples directory in 1.1.2 2005-11-15 14:43 ` Wolfgang Denk @ 2005-11-15 14:47 ` John Davis 0 siblings, 0 replies; 11+ messages in thread From: John Davis @ 2005-11-15 14:47 UTC (permalink / raw) To: u-boot Hello Wolfgang, Man you are modest. I didn't realize until now that you have your own toolchain as well as working on u-boot. Geez, I feel like a noob. I'll try it out now. Many thanks, JD On 11/15/05, Wolfgang Denk <wd@denx.de> wrote: > > In message <6a7ac2300511150504x6bbb8bd8pa998bcf2ddaa19f4@mail.gmail.com> > you wrote: > > > > Ok. Thank you for the reality check. Could you please tell me where i > can > > get a reliable toolchain so I can end my frustration? > > ELDK? See http://www.denx.de/wiki/view/DULG/ELDKAvailability > > > Best regards, > > Wolfgang Denk > > -- > Software Engineering: Embedded and Realtime Systems, Embedded Linux > Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de > Brontosaurus Principle: Organizations can grow faster than their > brains can manage them in relation to their environment and to their > own physiology: when this occurs, they are an endangered species. > - Thomas K. Connellan > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.denx.de/pipermail/u-boot/attachments/20051115/505767a2/attachment.htm ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] maybe just one more bug left in building the examples directory in 1.1.2 2005-11-15 11:38 ` Wolfgang Denk 2005-11-15 13:04 ` John Davis @ 2006-03-08 11:26 ` Jörn Engel 2006-03-08 11:44 ` Wolfgang Denk 1 sibling, 1 reply; 11+ messages in thread From: Jörn Engel @ 2006-03-08 11:26 UTC (permalink / raw) To: u-boot On Tue, 15 November 2005 12:38:50 +0100, Wolfgang Denk wrote: > in message <6a7ac2300511150252w60601196qea018696ae5d1813@mail.gmail.com> you wrote: > > "the last bug" ??? Famous last words. There's always one "last bug" left. ;) > > complains about __got2_entries. I found this defined in our board > .... > > ppc-linux-ld: BFD 2.15.90.0.1.1 20040303 (SuSE Linux) assertion fail > > ../../bfd/elf32-ppc.c:5645 > > make[1]: *** [hello_world] Segmentation fault > > Your tool crashes with a segmentation fault. That's a tolchain > problem. Get yourself working tools and forget about all this > trouble. Not entirely a toolchain problem. Here is a patch that fixes the problem, if the toolchain happens to include the SuSE gcc 3.3.3 "Hammer" compiler. Patch is against git tree on kernel.org. --- uboot_hammer/examples/stubs.c~hammer 2006-03-08 12:10:07.000000000 +0100 +++ uboot_hammer/examples/stubs.c 2006-03-08 12:17:06.000000000 +0100 @@ -136,7 +136,7 @@ gd_t *global_data; * implementation. On the other hand, asm() statements with * arguments can be used only inside the functions (gcc limitation) */ -#if GCC_VERSION < 3004 +#if GCC_VERSION < 3003 static #endif /* GCC_VERSION */ void __attribute__((unused)) dummy(void) This patch is clearly unacceptable, as it breaks real gcc 3.3 compilers. But it would still be nice to have some sort of workaround for the SuSE-created problem. J?rn -- "Error protection by error detection and correction." -- from a university class ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] maybe just one more bug left in building the examples directory in 1.1.2 2006-03-08 11:26 ` Jörn Engel @ 2006-03-08 11:44 ` Wolfgang Denk 2006-03-08 12:15 ` Jörn Engel 0 siblings, 1 reply; 11+ messages in thread From: Wolfgang Denk @ 2006-03-08 11:44 UTC (permalink / raw) To: u-boot In message <20060308112603.GA1116@wohnheim.fh-wedel.de> you wrote: > > > > make[1]: *** [hello_world] Segmentation fault > > > > Your tool crashes with a segmentation fault. That's a tolchain > > problem. Get yourself working tools and forget about all this > > trouble. > > Not entirely a toolchain problem. Here is a patch that fixes the It is entirely a toolchain problem. No matter what input you feed into it, the linker (like any other program) must NEVER crash with a segmentation fault. There is no excuse for such a bug. Best regards, Wolfgang Denk -- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The human race is faced with a cruel choice: work or daytime tele- vision. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] maybe just one more bug left in building the examples directory in 1.1.2 2006-03-08 11:44 ` Wolfgang Denk @ 2006-03-08 12:15 ` Jörn Engel 2006-03-08 13:16 ` Wolfgang Denk 0 siblings, 1 reply; 11+ messages in thread From: Jörn Engel @ 2006-03-08 12:15 UTC (permalink / raw) To: u-boot On Wed, 8 March 2006 12:44:03 +0100, Wolfgang Denk wrote: > In message <20060308112603.GA1116@wohnheim.fh-wedel.de> you wrote: > > > > > > make[1]: *** [hello_world] Segmentation fault > > > > > > Your tool crashes with a segmentation fault. That's a tolchain > > > problem. Get yourself working tools and forget about all this > > > trouble. > > > > Not entirely a toolchain problem. Here is a patch that fixes the > > It is entirely a toolchain problem. No matter what input you feed > into it, the linker (like any other program) must NEVER crash with a > segmentation fault. There is no excuse for such a bug. Yes, sure. The "Hammer" compiler has its issues, it has bitten me before and will likely bite me again. The sad fact remains that I'm forced to work with it, after all. The world is not perfect and we have to deal with it. And I'd claim that compilers aren't perfect and programs have to deal with it as well, within reason. Would it be unreasonable to have a workaround for this problem in U-Boot? J?rn -- Ninety percent of everything is crap. -- Sturgeon's Law ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] maybe just one more bug left in building the examples directory in 1.1.2 2006-03-08 12:15 ` Jörn Engel @ 2006-03-08 13:16 ` Wolfgang Denk 2006-03-08 13:58 ` Jörn Engel 0 siblings, 1 reply; 11+ messages in thread From: Wolfgang Denk @ 2006-03-08 13:16 UTC (permalink / raw) To: u-boot In message <20060308121502.GB1116@wohnheim.fh-wedel.de> you wrote: > > well, within reason. Would it be unreasonable to have a workaround > for this problem in U-Boot? No, of course not, but the workaround must not interfere with any other configuration, and I can't see how to do this. Using the GCC version id is obviously not sufficient here. Best regards, Wolfgang Denk -- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Der Horizont vieler Menschen ist ein Kreis mit Radius Null -- und das nennen sie ihren Standpunkt. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] maybe just one more bug left in building the examples directory in 1.1.2 2006-03-08 13:16 ` Wolfgang Denk @ 2006-03-08 13:58 ` Jörn Engel 0 siblings, 0 replies; 11+ messages in thread From: Jörn Engel @ 2006-03-08 13:58 UTC (permalink / raw) To: u-boot On Wed, 8 March 2006 14:16:54 +0100, Wolfgang Denk wrote: > In message <20060308121502.GB1116@wohnheim.fh-wedel.de> you wrote: > > > > well, within reason. Would it be unreasonable to have a workaround > > for this problem in U-Boot? > > No, of course not, but the workaround must not interfere with any > other configuration, and I can't see how to do this. Using the GCC > version id is obviously not sufficient here. Correct. So far, the only clue GCC is giving me is this: $ ppc-linux-gcc --version ppc-linux-gcc (GCC) 3.3.3 (SuSE Linux) ^^^^^^^^^^ So some Makefile magic with a grep, adding a #define and using it in the conditional compile statement would be possible. But maybe there's a nicer solution as well. J?rn -- Prosperity makes friends, adversity tries them. -- Publilius Syrus ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2006-03-08 13:58 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-11-15 10:52 [U-Boot-Users] maybe just one more bug left in building the examples directory in 1.1.2 John Davis 2005-11-15 11:38 ` Wolfgang Denk 2005-11-15 13:04 ` John Davis 2005-11-15 14:10 ` Andrew Wozniak 2005-11-15 14:43 ` Wolfgang Denk 2005-11-15 14:47 ` John Davis 2006-03-08 11:26 ` Jörn Engel 2006-03-08 11:44 ` Wolfgang Denk 2006-03-08 12:15 ` Jörn Engel 2006-03-08 13:16 ` Wolfgang Denk 2006-03-08 13:58 ` Jörn Engel
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.