Skip to content

Instantly share code, notes, and snippets.

@Bigcheese
Created January 7, 2013 04:07
Show Gist options
  • Save Bigcheese/4472242 to your computer and use it in GitHub Desktop.
Save Bigcheese/4472242 to your computer and use it in GitHub Desktop.
Finally... lld working with dietlibc.
michael@michael-VirtualBox:~/test$ lld -flavor ld /usr/lib/diet/lib/start.o hello-world.o /usr/lib/diet/lib/libc.a -o hello-world-lld
michael@michael-VirtualBox:~/test$ llvm-objdump -p hello-world-lld
hello-world-lld: file format ELF64-x86-64
Program Header:
LOAD off 0x0000000000000000 vaddr 0x0000000000400000 paddr 0x0000000000400000 align 2**12
filesz 0x00000000000004a8 memsz 0x00000000000004a8 flags r-x
LOAD off 0x0000000000001000 vaddr 0x0000000000401000 paddr 0x0000000000401000 align 2**12
filesz 0x0000000000000008 memsz 0x0000000000000050 flags rw-
LOAD off 0x0000000000002000 vaddr 0x0000000000402000 paddr 0x0000000000402000 align 2**12
filesz 0x0000000000000208 memsz 0x0000000000000208 flags r--
michael@michael-VirtualBox:~/test$ ./hello-world-lld
SSH_AGENT_PID=1284
Hello, World!
michael@michael-VirtualBox:~/test$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment