http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50237
--- Comment #14 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2011-08-31 15:46:46 UTC --- On Wed, 31 Aug 2011, hjl.tools at gmail dot com wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50237 > > --- Comment #13 from H.J. Lu <hjl.tools at gmail dot com> 2011-08-31 15:44:02 > UTC --- > (In reply to comment #12) > > > > 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). > > .init_array section is an array of pointers. How do you grep it? You arrange for the pointers to be assigned values whose bytes happen to correspond to text (endian-independent text, ideally). Just like using grep to determine target endianness or floating point format.