[Patch]: fix bfd/targets.c build failure on AIX

Kai Tietz ktietz70@googlemail.com
Tue Nov 17 14:06:00 GMT 2009


2009/11/17 Alan Modra <amodra@bigpond.net.au>:
> On Tue, Nov 17, 2009 at 01:34:07PM +0100, Kai Tietz wrote:
>> binutils-owner@sourceware.org wrote on 17.11.2009 13:20:11:
>> > This is wrong.  alloca should not be used in libbfd, and where we
>> > grudgingly accept it, alloca-conf.h needs to be the first include
>> > file.
>>
>> just by curiousity. Where is written that alloca shouldn't be used in
>> libbfd?
>
> I don't think we document it anywhere, but see
> http://sourceware.org/ml/binutils/2000-09/msg00367.html
>
> I'm inclined to think that bfd functions used only by ld are exempt
> from Ian's rule that libraries ought not abort.

Well, main objections here is abort (), exit () AFAIU Ian's reply.

>> By a grepping through the source of bfd, there are many places
>> using alloca already?
>
> Prior to your targets.c patch it was only in 4 target specific
> files.

I count 6 locations (with my patch) just in bfd/ (elf32-m68hc1x.c,
elf32-m68hc1x.c, pef.c, som.c, xsym.c, and targets.c).

Cheers,
Kai


-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination



More information about the Binutils mailing list