Hi Sebastien,
I created a pragma to change the locality of data a in my code.
When I put "#pragma foo a" in file1.c and file2.c, I got the good result:
2.000000 0x80900850
But if it is only in file1.c, the result is
0.000000 0x0.
I'm using Binutils 2.18.
Which part of the code I need to modify?
Without knowing the details of how you have implemented "#pragma foo" it
is going to be difficult to answer your question. Also it would help to
know which target you are compiling for and what type of host machine
you are using.
Essentially what you need to do is to look at the assembler output of
the compiler for the two files and see how they are declaring variable
"a". Then
look in the linker to see how the references to "a" in file2.c fail to
be connected to the declaration of "a" in file1.c. This is going to be
handled somewhere inside the ..._relocate_section() function found in
the target specific source file in the bfd/ directory of the binutils
sources.
Cheers
Nick
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils