Compiling issues: undefined reference to `.Lline_table_start1'

Hello LLVM,

I encountered the following bugs when I compiled my program in debug version.
Could someone help me with that ? Really appreciate that. Thanks,

Take the mcf program in SPEC2K6 as example. The compiling options are :

clang -O0 -c -emit-llvm -o obj/mcf.o -g -DSPEC_CPU mcf.c
llvm-link -o mcf.bc obj/mcf.o
opt -o mcf.opt.bc mcf.bc -O2
llc -O0 -relocation-model=static -o mcf.s mcf.opt.bc
clang mcf.s -o mcf
/tmp/mcf-CvkpnA.o:(.debug_info+0x48d): undefined reference to `.Lline_table_start1'
/tmp/mcf-CvkpnA.o:(.debug_info+0x894): undefined reference to `.Lline_table_start2'
/tmp/mcf-CvkpnA.o:(.debug_info+0xfce): undefined reference to `.Lline_table_start3'
/tmp/mcf-CvkpnA.o:(.debug_info+0x1226): undefined reference to `.Lline_table_start4'
/tmp/mcf-CvkpnA.o:(.debug_info+0x1921): undefined reference to `.Lline_table_start5'
/tmp/mcf-CvkpnA.o:(.debug_info+0x1e8c): undefined reference to `.Lline_table_start6'
/tmp/mcf-CvkpnA.o:(.debug_info+0x21c7): undefined reference to `.Lline_table_start7'
/tmp/mcf-CvkpnA.o:(.debug_info+0x23e2): undefined reference to `.Lline_table_start8'
/tmp/mcf-CvkpnA.o:(.debug_info+0x2b39): undefined reference to `.Lline_table_start9'
/tmp/mcf-CvkpnA.o:(.debug_info+0x2f9f): undefined reference to `.Lline_table_start10'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Thanks,
- Pengcheng

This is from work that Manman did. I thought she’d fixed this particular issue though. Can you file a bug with a test case please?

What do you mean by test case please ? Using the following commands to compile mcf program
can reproduce such issue all the time.

Probably it is my version’s problem. Because I checked out 3.3version from SVN before published.

Could you tell me where Manman modified ? I cannot port to new version very quickly after changing
it a lot already.

Thanks,

  • Pengcheng

Hi,

What version of clang are you using? I think r174785 is the fix.

Manman

Also r174479.

Manman

Very old version. r1128011….