Skip to contentSkip to conversation

what's the purpose of SYMBOL_NAME()

DISCUSSION Marty Leisner 2 participants 2 messages Jun 14, 2001

lore
Share & tools
lore
#0 lore raw

I'm read Bovet's "Understand the Linux Kernel"
and looked at the assembly routine setup_idt...

I noticed the assembly has SYMBOL_NAME
(its all over the place).

This is define in include/linux/linkage.h

to just:
#define SYMBOL_NAME(X) X

(this wasn't in Bovet's book).

What's the purpose?

marty [email protected]
Don't confuse education with schooling.
Milton Friedman to Yogi Berra

#1 lore raw
Quoted 7 lines · Marty Leisner

I'm read Bovet's "Understand the Linux Kernel"
and looked at the assembly routine setup_idt...

I noticed the assembly has SYMBOL_NAME
(its all over the place).

Quoted 8 lines

This is define in include/linux/linkage.h

to just:
#define SYMBOL_NAME(X) X

(this wasn't in Bovet's book).

What's the purpose?

IIRC, it's a holdover from the days when the kernel could be compiled in a.out and ELF format. a.out prepends an underscore to all symbols, whereas ELF does not.

--

Brian Gerst