Compiling and linking 32 bit code on a 64 machine (AMD Opteron)
Daniel Jacobowitz
drow@false.org
Thu Jun 22 13:46:00 GMT 2006
More information about the Binutils mailing list
Thu Jun 22 13:46:00 GMT 2006
- Previous message (by thread): Compiling and linking 32 bit code on a 64 machine (AMD Opteron)
- Next message (by thread): Compiling and linking 32 bit code on a 64 machine (AMD Optero n)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Jun 22, 2006 at 01:15:54PM +0100, CARTER-HITCHIN, David, GBM wrote: > I also have some -Lpath switches to pick up the 32 bit libraries. > Interestingly, at one point, ld tries to find libgcc_s.so, but can't find > it. It does find the 64 bit version under my GCC 3.4.6 installation, but > can't find the 32 bit one because that's called libgcc_s.so.1 - there is a > symlink called libgcc_s_32.so to libgcc_s.so.1, but nothing called > libgcc_s.so here, so I created a link called that to point to libgcc_s.so.1. > Perhaps that is a GCC question, but did I do the Right Thing(tm)? If you had to do this, your GCC is not configured properly. GCC should be generating -lgcc_s_32 automatically in this configuration. >From the rest of your problems, it looks to me like you're not linking correctly. Are you giving those options to ld directly? Or to gcc using -Wl? Don't. Instead, let GCC do all the heavy lifting. If -m32 is in your CFLAGS, you must also use it at link time. The correct way to do this is to include $(CFLAGS) in your link rules. -- Daniel Jacobowitz CodeSourcery
- Previous message (by thread): Compiling and linking 32 bit code on a 64 machine (AMD Opteron)
- Next message (by thread): Compiling and linking 32 bit code on a 64 machine (AMD Optero n)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list