This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR42531: lto generates invalid assembler ".section" directives.
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Dave Korn <dave dot korn dot cygwin at googlemail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 1 Jan 2010 13:10:19 +0100
- Subject: Re: [PATCH] Fix PR42531: lto generates invalid assembler ".section" directives.
- References: <4B3B8789.7060107@gmail.com> <6dc9ffc80912310802r3a6c4344kf5a9795982de8976@mail.gmail.com> <4B3CDC37.1060701@gmail.com> <84fc9c000912310930k47f99521g8e9450709f5f83be@mail.gmail.com> <4B3CE550.2020601@gmail.com> <6dc9ffc80912310954y4f380647p30ec6f30dfc959a7@mail.gmail.com> <4B3CEABD.6050803@gmail.com> <6dc9ffc80912311005x4b44df77tced9e9a052f013fc@mail.gmail.com>
On Thu, Dec 31, 2009 at 7:05 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Thu, Dec 31, 2009 at 10:17 AM, Dave Korn
> <dave.korn.cygwin@googlemail.com> wrote:
>> Dave Korn wrote:
>>
>>> ? Rather than continue tracking them down one by one, I will try modifying
>>> lto_get_section_name() itself to skip a leading asterisk, which might have
>>> been the better approach to try in the first place. ?I'll bootstrap it on a
>>> linux system and see if it solves these new FAILs.
>>
>> H.J. Lu wrote:
>>
>>> We have a mismatch among all callers of lto_get_section_name. We
>>> should fix it in lto_get_section_name, not its callers. OK for trunk?
>>
>> ?You beat me to it while I was still updating all the prerequisites on my old
>> linux vm! ?This matches what I was thinking of.
>>
>> ?You might perhaps want to guard against null before testing name[0], because
>> as the function currently stands, it would behave sensibly if name was passed
>> in as NULL; the NULL would just act as an early terminator in the varargs
>> passed to concat(), and you'd get back the plain LTO_SECTION_NAME_PREFIX
>> unadorned. ?But then again you might just want to assert, because this should
>> really almost certainly never happen.
>>
>
> Here is the updated patch. OK for trunk?
Ok.
Thanks,
Richard.
>
> --
> H.J.
>