Illegal Instruction

Russel Winder russel at winder.org.uk
Sun Mar 25 14:38:55 UTC 2018


On Sat, 2018-03-24 at 21:34 +0000, David Nadlinger via digitalmars-d-ldc
wrote:
> […]


> $ . ~/dlang/ldc-1.8.0/activate
> $ cat > test.d
> void foo() {}
> ^D
> $ cat > main.d
> import test;
> void main() {
>    foo();
> }
> ^D
> $ ldmd2 -fPIC -g -shared test.d
> $ ldmd2 main.d -g -L-ltest -L-L. -L-R.
> $ ./main
> Aborting from rt/sections_elf_shared.d(477) Only one D shared 
> object allowed for static runtime. Link with shared runtime via 
> LDC switch '-link-defaultlib-shared'.
> Aborted (core dumped)
> $ ldmd2 main.d -g -L-ltest -L-L. -L-R. -link-defaultlib-shared
> $ ./main

I created test.d and main.d and then on Debian Sid:

|> ldmd2 -fPIC -g -shared test.d
|> ldmd2 main.d -g -L-ltest -L-L. -L-R.
|> ./main 
|> ldmd2 main.d -g -L-ltest -L-L. -L-R. -link-defaultlib-shared
|> ./main 
|> 

>   — David
-- 
Russel.
==========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-ldc/attachments/20180325/ccc0f8f4/attachment.sig>


More information about the digitalmars-d-ldc mailing list