[prev in list] [next in list] [prev in thread] [next in thread] 

List:       9fans
Subject:    [9fans] Can the 8l linker read ELF object files?
From:       Ryan Gonzalez <rymg19 () gmail ! com>
Date:       2014-10-27 22:23:09
Message-ID: CAO41-mPWVU3iHjiXKDfza_nUZrYh45VYR3YTft+WSMztwdi1bw () mail ! gmail ! com
[Download RAW message or body]

I have a simple C program:

#include <lib9.h>

void main()
{
    print("abc\n");
    exits(nil);
}

I built it under Linux using ken-cc (the Linux port of the Plan 9
compilers). However, this happens when I try to link it:

8l -L/home/ryan/stuff/ken-cc/Linux/386/lib -l9 -o test test.8
main: undefined: print
main: undefined: exits

Evidently, 8l isn't picking up the ELF objects in lib9.a. Can I make it
read them somehow?

-- 
Ryan
If anybody ever asks me why I prefer C++ to C, my answer will be simple:
"It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was
nul-terminated."
Personal reality distortion fields are immune to contradictory evidence. -
srean
Check out my website: http://kirbyfan64.github.io/

[Attachment #3 (text/html)]

<div dir="ltr">I have a simple C program:<div><br></div><div><div>#include \
&lt;lib9.h&gt;</div><div><br></div><div>void main()</div><div>{</div><div>      \
print(&quot;abc\n&quot;);</div><div>      \
exits(nil);</div><div>}</div><div><br></div><div>I built it under Linux using ken-cc \
(the Linux port of the Plan 9 compilers). However, this happens when I try to link \
it:</div><div><br></div><div><div>8l -L/home/ryan/stuff/ken-cc/Linux/386/lib -l9 -o \
test test.8</div><div>main: undefined: print</div><div>main: undefined: \
exits</div></div><div><br></div><div>Evidently, 8l isn&#39;t picking up the ELF \
objects in lib9.a. Can I make it read them somehow?</div><div><br></div>-- <br><div \
dir="ltr">Ryan<div><div>If anybody ever asks me why I prefer C++ to C, my answer will \
be simple: &quot;It&#39;s becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don&#39;t \
think that was nul-terminated.&quot;</div></div>Personal reality distortion fields \
are immune to contradictory evidence. - srean<div>Check out my website:  <a \
href="http://kirbyfan64.github.io/" \
target="_blank">http://kirbyfan64.github.io/</a></div></div> </div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic