This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Move unwind info to read-only section on AIX
- From: Andrew Dixie <andrewdixie50 at gmail dot com>
- To: David Edelsohn <dje dot gcc at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 31 Jul 2014 14:50:44 +1200
- Subject: Re: Move unwind info to read-only section on AIX
- Authentication-results: sourceware.org; auth=none
- References: <CAPrih1nqm8w0YoCdBv6iuj_56JmvXGSGQFh5rwa3GS3sLrf5hQ at mail dot gmail dot com> <CAGWvnymhdnVDyq8g_xS=SK7pegLK1tGAmQBC7xrLD1nA-dJQYQ at mail dot gmail dot com>
Hi David,
On Thu, Jul 31, 2014 at 2:22 PM, David Edelsohn <dje.gcc@gmail.com> wrote:
> As the comment in the code states DWARF2 unwind info was placed in the
> data section to prevent the AIX linker from garbage collecting it.
> How are you avoiding that problem?
That comment is very old. I'm not sure what the original problem was.
The code generated by collect2 which calls register_frame_info_table
has explicit references to the DWARF unwind info. The linker won't
garbage collect the unwind info as the linker will see it as used
through these references.
> Also, the AIX linker uses "$" for the current location, so the kludge
> of creating PCREL symbols should not be necessary.
I will swap it over to this.
> Using __dso_handle as the base address is underwhelming.
Does the using the TOC sound like a reasonable solution?
Or do you know how to get a reference to the start of the data section
from the AIX assembler/linker?
The ld manpage lists _data, but this symbol doesn't work for shared libraries.
Thanks,
Andrew