[K42-discussion] genConstants.c on x86_64/gcc4.1
Patrick G. Bridges
bridges at cs.unm.edu
Sat Sep 8 09:33:39 EST 2007
I'm slowly working through the x86_64/gcc4 port right now, and have
run into a roadblock with genConstants.s. As a reminder,
genConstants.C defines a function, genConstants, which is marked as a
friend function of a number of k42 classes, which itself defines an
initialized static unsigned long for each constant that a script
later pulls out of the generated assembly to create a header file of
constants that assembly code can use. This lets us have assembly
constants for, for example, offsets into classes.
The problem I'm having on x86_64/gcc4.1 is that the generated code,
even with -O0 -g, doesn't generate symbols and data for these local
static variables, presumably because they're dead by static analysis?
We also cannot pull all of these definitions out to extern variables
without changing a number of class variables to being public (since
you can't "friend" global scope). I've also tried marking them as
volatile static, which doesn't help.
Any suggestions on how to deal with this?
More information about the K42-discussion
mailing list