help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'ld' question


From: Shane Stevens
Subject: 'ld' question
Date: Mon, 4 Nov 2002 11:52:24 +1100

Hi,
I hope this doesn’t sound like a stupid question, but is there any way to
link a series of ‘as’ assembled object files containing no code?  So no
‘main’ or anything.  I just want to link data with a reloc hunk so I can
write a relocation loader to relocate the data upon load, so effectively I
want to assemble DATA not CODE.  So I want the smallest/leanest possible
binary.  I can’t see a way to do it without having a main definition…

So theoretically if I wanted one section like this:

.long label
label:

That would produce just what I need, a single long definition with a forward
reference to ‘label’ which would cause a ‘rel’ hunk to be emitted in the
object file.  Now if I could just link this to give me a final relocation
hunk with the data section containing the long, I’d be in business.

Any help would be much appreciated.

Thanks,
Shane







reply via email to

[Prev in Thread] Current Thread [Next in Thread]