http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50237

--- Comment #12 from joseph at codesourcery dot com <joseph at codesourcery dot 
com> 2011-08-31 15:27:44 UTC ---
On Wed, 31 Aug 2011, hjl.tools at gmail dot com wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50237
> 
> --- Comment #11 from H.J. Lu <hjl.tools at gmail dot com> 2011-08-31 04:21:53 
> UTC ---
> (In reply to comment #10)
> > On Tue, 30 Aug 2011, hjl.tools at gmail dot com wrote:
> > 
> > > The main issue is mixing input .ctors sections with .init_array sections
> > > to generate the single output .init_array section.  Not all linkers 
> > > support
> > > it even if they support .init_array section.  How should we properly
> > > test this?
> > 
> > Is it not possible to link (with -r, maybe) objects and examine the output 
> > with target objdump to see if .ctors sections are still present?
> 
> "ld -r" won't/shouldn't combine different sections.  We
> can use ld to generate executables.  How can we check if
> input .ctors.* and .init_array.* sections are placed
> in the right order?

Arrange for the contents to have appropriate text values you can check for 
with grep (or if you wish a custom C program to run on the build system to 
examine ELF structures - only ELF needs to be considered for this, after 
all, and I think at this point you may even be able to rely on having 
libiberty already built for the build system, complete with the 
simple-object-elf code).

Reply via email to