[GOLD][PATCH] Set ARM ABI information in ELF file header.

Ian Lance Taylor iant@google.com
Fri Oct 30 17:41:00 GMT 2009


"Doug Kwan (關振德)" <dougkwan@google.com> writes:

> 2009/10/30 Ian Lance Taylor <iant@google.com>:
>
>
>> This looks like you are going to set the processor specific flags for
>> the output even if the input doesn't have any.  That doesn't seem
>> right.  If input doesn't have any flags, don't set the output flags.
>>
>
> The flags is initialized to 0.  So this preserve the existing
> behaviour, which is setting the flags to zero on all target.

The difference is that after the next input file you are going to
decide that the flags are set in the output file, and you are going to
complain if they are different in the input file.

In other words, the linker will give an error when mixing some input
files with no flags with some input files with flags.  Maybe that is
the desired behaviour for these flags.  In many cases, though, it is
not, because it is not backward compatible.

Note how elf32_arm_merge_private_bfd_data in bfd/elf32-arm.c does
permit this case: an input file with no flags does not set the flags
in the output file.

Ian



More information about the Binutils mailing list