This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] SEGV whilst placing sections
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Mark Shinwell <shinwell at codesourcery dot com>
- Cc: binutils at sourceware dot org
- Date: Tue, 20 Jun 2006 07:46:02 -0700
- Subject: Re: [PATCH] SEGV whilst placing sections
- References: <44980174.6020000@codesourcery.com>
On Tue, Jun 20, 2006 at 03:08:52PM +0100, Mark Shinwell wrote:
> The following C code, when compiled for an ARM target with -fexceptions
> and linked using the attached linker script, causes SEGV in
> lang_insert_orphan () when placing the .ARM.extab section.
>
> int f(int *);
>
> int g(void)
> {
> int a;
> return f(&a);
> }
>
> In this case, the "after" parameter to lang_insert_orphan () corresponds
> to the .rodata section, the last in the linked list of "asection"s.
> The upshot is that place->section points at the "next" entry of the final
> section in the list, .rodata. This "next" pointer is NULL, so "as" ends up
> NULL, and we fault when "as->prev" is computed.
>
Can you provide a testcase in assembly so that people can check it
with a cross binutils?
H.J.