berkus / mclinker

Automatically exported from code.google.com/p/mclinker
Other
0 stars 0 forks source link

Fail to read input relocation if the symbol is not in symbol table #91

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
llvm-mcld -march=x86 --eh-frame-hdr -V -dynamic-linker /libexec/ld-elf.so.1 -o 
pmbr -e start -L/usr/lib -L/usr/lib -N -S --oformat binary pmbr.o -Ttext 0x600

Fatal: can not read symbol[0] in file pmbr.o

================================================================================
==========================

!@#$# readelf -rs pmbr.o                                                        

Relocation section '.rel.text' at offset 0x82c contains 9 entries:
 Offset     Info    Type            Sym.Value  Sym. Name
0000000d  00000214 R_386_16          00000000   .text
00000010  00000214 R_386_16          00000000   .text
00000030  00000214 R_386_16          00000000   .text
0000005b  00000214 R_386_16          00000000   .text
000000dc  00000214 R_386_16          00000000   .text
000000e1  00000214 R_386_16          00000000   .text
000000e6  00000214 R_386_16          00000000   .text
000000eb  00000214 R_386_16          00000000   .text
0000008a  00000015 R_386_PC16

================================================================================
==========================

BTW, pmbr.o is from pmbr.s:
as  --defsym FLAGS= -o pmbr.o pmbr.s

Original issue reported on code.google.com by pete.c...@gmail.com on 17 Oct 2012 at 6:24

Attachments:

GoogleCodeExporter commented 9 years ago
Revision 067686f456be uses LDSymbol::Null() as the first element of 
LDContext::SymbolTable.

Original comment by LubaTang on 18 Oct 2012 at 5:02

GoogleCodeExporter commented 9 years ago

Original comment by pete.c...@gmail.com on 18 Jan 2013 at 2:46