This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] gold: add incremental input structures definitions


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."

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]