This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ABI, I don't get it...

I've sent a couple of private messages to Maciej about this, so this
won't be a huge surprise to at least one on this list...

I am working with the Broadcom XLP processor.  We are number crunching
big-time, for which this processor was made.  The original port that we
found of binutils of this was from a few years ago (the link to which
can be found in another thread on this list) seems incomplete.  In the
hopes that this patch was completely upstreamed, I grabbed the latest
binutils, and the rest of the toolchain, the objective of which was to
get a fully working 64 bit ABI based toolchain for the XLP.  Turns out
that the added patch to binutils is not complete at all.  There is a
comment in one file that says something like "the XLP is just like the
XLR except that it is a mips64r2".  Unfortunately, this is incorrect
as there are at least a dozen instructions that aren't defined for the
XLR that are required for the XLP (things like -- for lack of a better
term -- callbacks for various operations).

So, after working with the new toolchain for about a week, and
attempting to port the changes (which, from the 2.24 release of binutils
conflicts with the changes put in for the Octeon3), I gave up and
reverted back to my 2.24 binutils.  I then found a patch from Maciej to
allow me to set the default ABI of the toolchain to 64, however, it
didn't seem to work.  Following the spirit of the patch, I made
additional changes to Gcc, (all of the support packages for binutils),
GDB, and eglibc.  Nothing has seemed to work.

Next, I focused in on my build system (which is a highly modified
version of an old BuildRoot -- everything stripped out of it an only our
proprietary stuff being built by a heavy modification of it -- really,
the only thing we kept was the configuration.  Having said that, there
were adaptations of the toolchain settings that we kept from BR.
Adjusting these values (selecting the ABI for the platform, soft/hard
float etc) has led me into a situation in which I get the following
error routinely:

ABI is incompatible with that of the selected emulation

This comes from the toolchain that I ACTUALLY GOT our IP to build with,
however, it core dumps immediately (as I expected given the linker

Another error, from a mixture that I cannot get to build correctly,
gives me the following:

/opt/toolchains/mips64-LinuxBSP-linux-gnu/mips64-LinuxBSP-linux-gnu/sysroot/usr/include/gnu/stubs.h:20:33: fatal error: gnu/stubs-n64_soft.h: No such file or directory

with a toolchain that was supposedly 64-bit native, hard-float.  Why
the floating point selection is soft, I cannot say.

If you have ANY idea that might help me on figuring this one out,
please provide a nugget.

Also, to answer another question from my other thread:  I have contacted
Broadcom about the original toolchain.  I have requested copyright
privileges from them, but have not received an answer on that one yet.
I get the sinking feeling that the FAE that recently left took with him
the only knowledge of how this processor works.

So, if I'm to get this working in the newer toolchain (assuming I get
permissions) I'll beg each of your help to do it the "right way".

Now, to be clear on what I'm asking in this e-mail:

1) Is there a way to determine the ABI calls being used in a particular
object file?

One thing I see from objdump is ".mdebug.abi64", but I see this in all
of the object files... which indicates to me that this is not a good

 --- my take on this is to build three int main () { return 0 ;} object
files with -mabi={64,o32,n32} and then link EACH object file from our IP
against each of these, to show which ones are being linked in with the
wrong ABI.
1.a) Does it matter (speaking of ABI) on the hard/soft float?

2) How can I determine whether an object file is built using hard-float
ABI calls?  I know that the XLP has a HW FPU.

Thanks in advance for any help you can provide me,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]