On 28/04/11 09:59, Barry Song wrote:
my other two mails explain what happened, in fact link input file is simple:
There must be more than one input file to the link, otherwise I believe you wouldn't see this problem. We need to find out what the other ones are.
ASSERT found just because we are using -nostdlib flag since we don't call any library. This flag changed out_attr[Tag_FP_arch] to 0, which is generically 4 for linaro new toolchain by watching a normal compile/link process.
The -nostdlib flag only changes the list of libraries that will be linked. It shouldn't change any attributes directly.
Here's how a link should work, if I understand it correctly:
1. The linker creates an empty output file (conceptually). This file will have all attributes set to default settings (i.e. zero).
2. Each input file is then merged into the output file in turn. New sections are added, or existing ones appended to, and the symbol tables and such are built incrementally. At each step, the attributes are merged from the input file to the output file.
For the first input file, the attribute merge is basically just a copy. Both Tag_FP_arch and Tag_ABI_HardFP_use should be zero in the (empty) output file, so we should not be able to hit this condition.
For the second input file, the attribute merge is more complicated. For each attribute the result will be either be the union, or the intersection of the two attributes, or else it will throw an error.
So, it should be that this can't happen, but clearly it does, so something is broken, but I can't tell what without reproducing it, or at least seeing what inputs you're dealing with.
So, please help me figure out what the full set of input files are and I see if I can work from there.
Thanks
Andrew