<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body alink="#EE0000" bgcolor="#ffffff" link="#0B6CDA" text="#000000"
vlink="#551A8B">
Hi Eli,<br>
<br>
Slightly changed the example :-<br>
<br>
.section somedata<br>
.Ltmpa:<br>
.word 100<br>
.Ltmpb:<br>
.word 60<br>
.Ltmpc:<br>
.word 40<br>
.Ltmpd:<br>
.word (.Ltmpa-.Ltmpb)-.Ltmpc<br>
<br>
The GNU assembler properly handles the above.<br>
<br>
$as -c x.s -o x.o<br>
$readelf -x 4 x.o<br>
<br>
Hex dump of section 'somedata':<br>
NOTE: This section has relocations against it, but these have NOT
been applied to this dump.<br>
0x00000000 64003c00 28000000 d.<.(...<br>
<font
color="#ff0000">^^^^ (Calculated properly too!)</font><br>
With clang/llvm-mc <br>
<br>
$ llvm-mc -filetype=obj x.s -o x.o<br>
LLVM ERROR: expected relocatable expression<br>
<br>
Looks like llvm-mc is more restrictive ?<br>
<br>
Thanks<br>
<br>
Shankar Easwaran<br>
<pre class="moz-signature" cols="72">--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation</pre>
</body>
</html>