This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc 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: libc_hidden_proto breaks things for PowerPC64


On Mon, Aug 19, 2002 at 09:28:55PM -0400, Roland McGrath wrote:
> > Roland, what do you mean by "fix the compiler support", especially in
> > regard to data definitions?
> 
> With all the intermediate versions we had in this stuff I lost track of the
> fact that hidden_def is always done via asm.  I don't know why it's that
> way (Jakub?).

That's because since gcc sees void foo (void) __asm ("bar"); it replaces
al occurences of foo in C program with bar in assembly, and we need to cheat
to generate foo into assembly.
You'd need either to tell gcc:
void foo (void) __asm ("bar");

void baz (void)
{
}

void foo (void) __attribute__ ((weak, alias ("baz")));
void foo (void) __asm ("foo") __attribute__ ((weak, alias ("bar")));

is ok (which currently certainly is not, the different __asm
causes a redefinition error), or come up with __attribute__((noasm))
or whatever:
void foo (void) __asm ("bar");

void baz (void)
{
}

void foo (void) __attribute__ ((weak, alias ("baz")));
void foo (void) __attribute__ ((noasm)) __attribute__ ((weak, alias ("bar")));

but I don't know if this problem is generic enough to be solved by gcc.

	Jakub


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