[PATCH] gold: add incremental input structures definitions
Michael Hennebry
hennebry@web.cs.ndsu.nodak.edu
Sat Feb 28 04:18:00 GMT 2009
On Fri, 27 Feb 2009, Mikolaj Zalewski wrote:
>> Mikolaj> diff --git a/elfcpp/elfcpp.h b/elfcpp/elfcpp.h
>> Mikolaj> + Â SHT_GNU_INCREMENTAL_INPUTS = 0x6ffffff5,
>>
>> Mikolaj> diff --git a/include/elf/common.h b/include/elf/common.h
>> Mikolaj> +#define SHT_GNU_INCREMENTAL_INPUTS 0x6ffffff4 Â /* incremental build data */
> Oops. I'll fix it.
>
>> Also, it seems weird to duplicate constants like this at all, for
>> exactly this reason.
> One of these is a C #define, while the other is a C++ enum value.
> Other SHT_* are also duplicated like that (I will need this only in
> C++, but I have also added it to the C file, so that a C developer
> doesn't think that this value is not used).
spot.h:
...
#define _SHT_GNU_INCREMENTAL_INPUTS 0x6ffffff4 Â /* incremental build data */
...
common.h:
#include "spot.h"
...
#define SHT_GNU_INCREMENTAL_INPUTS _SHT_GNU_INCREMENTAL_INPUTS
...
elfcpp.h:
#include "spot.h"
...
enum { define SHT_GNU_INCREMENTAL_INPUTS=_SHT_GNU_INCREMENTAL_INPUTS } ;
...
One could also have a spot.txt file and build common.h and elfcpp.h with sed.
--
Michael hennebry@web.cs.ndsu.NoDak.edu
"Pessimist: The glass is half empty.
Optimist: The glass is half full.
Engineer: The glass is twice as big as it needs to be."
More information about the Binutils
mailing list