This is the mail archive of the
mailing list for the binutils project.
Re: gc-sections removing required sections of elf
- From: Alan Modra <amodra at gmail dot com>
- To: Nagaraju Mekala <gnuuser dot raj at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 26 Feb 2014 22:10:21 +1030
- Subject: Re: gc-sections removing required sections of elf
- Authentication-results: sourceware.org; auth=none
- References: <CAKuVEhBBZoZXELV9z5+wKsuuZSOOD19J3e3YMcWO5=vnEdswUQ at mail dot gmail dot com> <20140221001731 dot GG3386 at bubble dot grove dot modra dot org> <CAKuVEhBcTu4phNAtyrMsy912PebfjvOOZsA9WF+fHQ9RcY2AfQ at mail dot gmail dot com>
On Mon, Feb 24, 2014 at 04:53:50PM +0530, Nagaraju Mekala wrote:
> Thanks Alan for the reply.
> On Fri, Feb 21, 2014 at 5:47 AM, Alan Modra <email@example.com> wrote:
> > On Thu, Feb 20, 2014 at 11:11:19PM +0530, Nagaraju Mekala wrote:
> >> Can anyone please let me know how can we tell the garbage collector
> >> to not to delete .debug information of _exit function.
> > Have a look at what is happening inside _bfd_elf_gc_mark_extra_sections.
> I looked at the _bfd_elf_gc_mark_extra_sections and tried modifying it
> with the basic knowlege I had.
I wasn't suggesting that you modify _bfd_elf_gc_mark_extra_sections.
It should work as is. What I was suggesting is to run the failing
link under gdb and step through _bfd_elf_gc_mark_extra_sections paying
attention to the object file (ibfd) that defines _exit. Is that file
seen as ELF? Do you see some_kept set true for that file? If so, are
the debug sections in that file marked with gc_mark?
Australia Development Lab, IBM