Skip to contentSkip to conversation

a question about HPUX's linker

parisc-linux Alex deVries 4 participants 4 messages Jun 11, 1999

lore
Share & tools
lore
#0 lore raw

To help us get ahead, I'm trying to get the kernel to build properly with HPUX, using HPUX's linker, and gcc.

Why does the final kernel link use --start-group ... --end-group?

What's the equivalent syntax for HPUX's ld?

I'm a bit short on docs in this area...

- Alex

#1 lore raw
Quoted 9 lines · Alex deVries

To help us get ahead, I'm trying to get the kernel to build properly with HPUX, using HPUX's linker, and gcc.

Why does the final kernel link use --start-group ... --end-group?

What's the equivalent syntax for HPUX's ld?

I'm a bit short on docs in this area...

This is something which happened towards the later days of 2.1 development. It causes GNU ld to scan through the archives indicated between --start-group and --end-group until no more symbols are resolved. It is a GNU extension. I think _in general_ it's not necessary, but there are a few corner cases where this is needed. Try taking it out, tell us what errors you get.

Of course, this is all due to Linux's lame build scripts and they should be replaced with something better. which I don't have time to work on, of course :-)

Signature · 4 lines
Matthew Wilcox <[email protected]>
"Windows and MacOS are products, contrived by engineers in the service of
specific companies. Unix, by contrast, is not so much a product as it is a
painstakingly compiled oral history of the hacker subculture." - N Stephenson
#2 lore raw
In reply to Alex deVries
Quoted 2 lines

To help us get ahead, I'm trying to get the kernel to build properly with HPUX, using HPUX's linker, and gcc.

Ditto. You sorted head.S out ?

Quoted 1 line

Why does the final kernel link use --start-group ... --end-group?

To do looping resolution of symbols

Quoted 1 line

What's the equivalent syntax for HPUX's ld?

ld +n

(sort of, but sufficiently sort of)

#3 lore raw
In reply to Alex deVries

Alex deVries writes:

| 
| What's the equivalent syntax for HPUX's ld?
| 
| I'm a bit short on docs in this area...
| 

The 'linker and library guide' is a little bit short on the advanced stuff unfortunately.

--Marcus