<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello,
<div><br class="webkit-block-placeholder"></div><div>I'm trying to do the following and encountering problems with the generated arm assembly code:</div><div><br class="webkit-block-placeholder"></div><div>I've got an application in two parts that i've compiled into llvm bitcode using:</div><div>llvm-gcc -emit-llvm -c part1.c -o part1.bc</div><div>llvm-gcc -emit-llvm -c part2.c -o part2.bc</div><div><br class="webkit-block-placeholder"></div><div>Then I link them together:</div><div>llvm-ld part1.bc part2.bc -o combined.bc</div><div><br class="webkit-block-placeholder"></div><div>Now I use the ARM backend via llc to generate the assembly for my target processor from combined.bc:</div><div>llc -march=arm -mcpu=arm7tdmi combined.bc</div><div><br class="webkit-block-placeholder"></div><div>The problem is when I run the generated file (combined.s) through an arm cross compiler for my target (arm-elf gcc toolchain) I get the following errors below. Has anybody encountered this before? Is there a way to do this? </div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: 12.0px Helvetica">combined.s: Assembler messages:</font></div></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: 12.0px Helvetica">combined.s:216: rd and rm should be different in mul</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">... repeated a few times</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">combined.s:969: rd and rm should be different in mla</div><div>... repeated a few times</div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: 12.0px Helvetica">combined.s:1330: Error: unknown pseudo-op: `.cstring'</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: 12.0px Helvetica">combined.s:1335: Error: junk at end of line, first unrecognized character is `,'</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">.. repeated many times</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: 12.0px Helvetica">combined.s:1366: Error: character following name is not '#'</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: 12.0px Helvetica">combined.s:1370: Error: unknown pseudo-op: `.indirect_symbol'</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: 12.0px Helvetica">combined.s:1375: Error: unknown pseudo-op: `.lazy_symbol_pointer'</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: 12.0px Helvetica">combined.s:1377: Error: unknown pseudo-op: `.indirect_symbol'</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">.. repeated a few times</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: 12.0px Helvetica">combined.s:1393: Error: unknown pseudo-op: `.subsections_via_symbols'</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br class="webkit-block-placeholder"></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br class="webkit-block-placeholder"></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Thank you,</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">-aa</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br class="webkit-block-placeholder"></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br class="webkit-block-placeholder"></div></div></div></div></div></div></body></html>