On 19 May 2011 06:11, Mark Wielaard <[email protected]> wrote:
> On Wed, 2011-05-18 at 12:53 -0500, Linas Vepstas wrote:
>> I was fiddling with elfutils and hit a trite buglet;
>>
>> lib/eu-config.h defines OLD_VERSION with an equals sign in it (instead of 
>> .set)
>> the assembler I use has equals signs reserved for other uses (they're 
>> actually
>> part of the instruction set).
>
> Using "=" for assigning symbols is normal gas usage.

Its gas. The core problem is that the instruction set itself uses equals signs
liberally to do register-register and register-memory assignments. An example
snippet (generated by gcc) below -- as should be clear, differentiating between
different uses of equals signs would be ... unpleasant.

I'd provide a patch; it would have to be to configure.ac, etc. but Ulrich's
comments suggest that it might not be worth the effort :-/  Suggestions?

-- linas

    .file "cycles.C"
   .section .bss,"aw",@nobits
   .subsection -2
   .lcomm   __gcov_indirect_call_callee,4,4,4
   .lcomm   __gcov_indirect_call_counters,4,4,4
   .section .rodata.str1.1,"aMS",@progbits,1
.LC0:
   .string  "%d"
   .text
   .p2align 2
   .p2align 4,,15
   .globl _Z3prti
   .type _Z3prti, @function
_Z3prti:
.LFB19:
   .cfi_startproc
   .cfi_personality 0x90,DW.ref.__gxx_personality_v0
   // saved LR + FP regs size (bytes) = 8
   // callee saved regs size (bytes) = 8
   // local vars size (bytes) = 104
   // fixed args size (bytes) = 0
   .cfi_def_cfa 30, 8
   .cfi_offset 31, -4
   .cfi_offset 30, -8
   .cfi_offset 24, -12

   {
      allocframe(#112)
      r10.h = #HI(.L2@GOTOFF)
      r4.h = #HI(.LPBX1@GOTOFF)
      r2.h = #HI(.LC0@GOTOFF)
   }
   {
      memw(r29+#108) = r24
      r10.l = #LO(.L2@GOTOFF)
      r4.l = #LO(.LPBX1@GOTOFF)
      r7:6 = #1
   }

# setup r24 as the GOT pointer
.L2:
   r24 = pc
   {
      r24 = sub(r24,r10)
      r2.l = #LO(.LC0@GOTOFF)
      r3 = r0
      r1 = #100
   }
   {
      r4 = add(r24,r4)
      r0 = r29
      r2 = add(r24,r2)
   }
   {
      r9:8 = memd(r4+#0)
   }
   {
      r7:6 = add(r9:8,r7:6)
   }
   {
      memd(r4+#0) = r7:6
      call snprintf@PLT
   }
   {
      r24 = memw(r29+#108)
      r0 = memw(r29+#0)
   }
   {
      deallocframe
   }
   {
      jumpr r31
   }
   .cfi_endproc
.LFE19:
   .size _Z3prti, .-_Z3prti
_______________________________________________
elfutils-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/elfutils-devel

Reply via email to