[Bug ld/16345] ld emits errors on .eh_frame from partial linking

2013-12-21 Thread stilor at att dot net
https://sourceware.org/bugzilla/show_bug.cgi?id=16345

--- Comment #7 from Alexey Neyman  ---
(In reply to H.J. Lu from comment #6)
> > Also, I think, a mention in the description of -r option in ld.info would be
> > appropriate.
> 
> .init section can only be used according to the gABI. It is irrelevant
> to  ld -r. When in doubt, DON't USE special sections documented in the
> gABI for your own purpose.

The .text section is also listed as a "special section" in gABI/LSB, yet you
suggested to use it:


Special Sections
...
.init
This section holds executable instructions that contribute to the process
initialization code. When a program starts to run, the system arranges to
execute the code in this section before calling the main program entry point
(called main for C programs).
...
.text
This section holds the ``text,'' or executable instructions, of a program.


I don't see how putting startup code in .init in a freestanding environment
contradicts the usage described by gABI, nor why a presense of the .init
section in any of the input objects should affect the relocation order in .text
section. Could you explain why you think the test case is not compliant to
gABI? Especially, the second version with the empty .init section?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/16345] ld emits errors on .eh_frame from partial linking

2013-12-21 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=16345

--- Comment #8 from H.J. Lu  ---
(In reply to Alexey Neyman from comment #7)
> (In reply to H.J. Lu from comment #6)
> > > Also, I think, a mention in the description of -r option in ld.info would 
> > > be
> > > appropriate.
> > 
> > .init section can only be used according to the gABI. It is irrelevant
> > to  ld -r. When in doubt, DON't USE special sections documented in the
> > gABI for your own purpose.
> 
> The .text section is also listed as a "special section" in gABI/LSB, yet you
> suggested to use it:
> 
> 
> Special Sections
> ...
> .init
> This section holds executable instructions that contribute to the process
> initialization code. When a program starts to run, the system arranges to
> execute the code in this section before calling the main program entry point
> (called main for C programs).

Linker concatenates all input .init sections and turn it into a single
function.  You can't use it for yourself.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils