mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* ENTRY-macro in linkage.h
@ 2003-02-08 16:51 Uwe Reimann
       [not found] ` <1044752435.18908.23.camel@irongate.swansea.linux.org.uk>
  0 siblings, 1 reply; 3+ messages in thread
From: Uwe Reimann @ 2003-02-08 16:51 UTC (permalink / raw)
  To: linux-kernel

Hi,

I'm currently porting linux to TI's TMS320C31. I'm using c4x-gcc, which 
has a problem with the ENTRY-macro from linkage.h. c4x-gcc will accept 
the generated .globl-directive only if it is preceded by whitescape. 
Right know, gcc thinks I want to create a label called .globl. Any ideas 
how to fix this without fixing gcc?

Regards, Uwe



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ENTRY-macro in linkage.h
       [not found] ` <1044752435.18908.23.camel@irongate.swansea.linux.org.uk>
@ 2003-02-09 12:35   ` Uwe Reimann
  2003-02-09 16:11     ` Roman Zippel
  0 siblings, 1 reply; 3+ messages in thread
From: Uwe Reimann @ 2003-02-09 12:35 UTC (permalink / raw)
  To: linux-kernel

My problem is how to add the whitespace. The preprocessor seems to strip 
it. Consider this (test.S):

#define ENTRY(X) \
  .global X##; \
X##:   

ENTRY(foo)
ENTRY(bar)

gcc -S test.S:

.global foo; foo:
.global bar; bar:

For c4x-gcc, this has to be like this:

    .global foo
foo:
    .global bar
bar:

Without the leading whitespace, .global is taken as a name of a label. 
Without the newline before the labels, they are not recognized (taken as 
comments).

How can I tell the preprocessor to emit spaces and newlines?

Alan Cox wrote:

>On Sat, 2003-02-08 at 16:51, Uwe Reimann wrote:
>  
>
>>Hi,
>>
>>I'm currently porting linux to TI's TMS320C31. I'm using c4x-gcc, which 
>>has a problem with the ENTRY-macro from linkage.h. c4x-gcc will accept 
>>the generated .globl-directive only if it is preceded by whitescape. 
>>Right know, gcc thinks I want to create a label called .globl. Any ideas 
>>how to fix this without fixing gcc?
>>    
>>
>
>I think every other port will probably be fine with the whitespace present
>so I guess add a space 8)
>
>
>
>  
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ENTRY-macro in linkage.h
  2003-02-09 12:35   ` Uwe Reimann
@ 2003-02-09 16:11     ` Roman Zippel
  0 siblings, 0 replies; 3+ messages in thread
From: Roman Zippel @ 2003-02-09 16:11 UTC (permalink / raw)
  To: Uwe Reimann; +Cc: linux-kernel

Hi,

On Sun, 9 Feb 2003, Uwe Reimann wrote:

> My problem is how to add the whitespace. The preprocessor seems to strip 
> it. Consider this (test.S):
> 
> #define ENTRY(X) \
>   .global X##; \
> X##:   
> 
> ENTRY(foo)
> ENTRY(bar)
> 
> gcc -S test.S:
> 
> .global foo; foo:
> .global bar; bar:
> 
> For c4x-gcc, this has to be like this:
> 
>     .global foo
> foo:
>     .global bar
> bar:
> 
> Without the leading whitespace, .global is taken as a name of a label. 
> Without the newline before the labels, they are not recognized (taken as 
> comments).

You don't have to use the ENTRY macro anymore, it was useful when kernel 
could be in a.out format, so the underscore was automatically prepended to 
the symbol.

bye, Roman


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-02-09 16:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-08 16:51 ENTRY-macro in linkage.h Uwe Reimann
     [not found] ` <1044752435.18908.23.camel@irongate.swansea.linux.org.uk>
2003-02-09 12:35   ` Uwe Reimann
2003-02-09 16:11     ` Roman Zippel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®