I have spent the last couple of hours groking code and I am coming up
empty on this one. I ran into this problem when trying to build the
'tst-tls10' test program from glibc. This is not a glibc problem, rather
an issue with my library and kernel header files, I think. I have ported
NPTL support from glibc into uClibc and I have tests 1-9 working for TLS
relocations as well as some of the pthread test programs. I cannot even
get tests 10-15 for TLS built because I get the errors:

   /tmp/cc0gotLY.s: Assembler messages:
   /tmp/cc0gotLY.s:99: Error: register value used as expression
   /tmp/cc0gotLY.s:136: Error: register value used as expression
   /tmp/cc0gotLY.s:173: Error: register value used as expression

So, I compared the compiler output from the glibc and uClibc test
programs and miraculously the only differences between the two is
show below:

--- tst-tls10.s 2005-10-22 11:55:37.852343750 -0500
+++ /build/crosstool-0.38/build/mips-unknown-linux-gnu/gcc-head-glibc-head/build-glibc/elf/tst-tls10.s 2005-10-22 11:08:07.546210750 -0500
@@ -70,7 +70,7 @@
        rdhwr   $3,$29
        .set    pop

-       lw      $16,%gottprel($5)($28)
+       lw      $16,%gottprel(a1)($28)
        nop
        addu    $3,$16,$3
        lb      $4,0($3)
@@ -104,7 +104,7 @@
        rdhwr   $3,$29
        .set    pop

-       lw      $19,%gottprel($6)($28)
+       lw      $19,%gottprel(a2)($28)
        nop
        addu    $3,$19,$3
        lb      $4,0($3)
@@ -138,7 +138,7 @@
        rdhwr   $3,$29
        .set    pop

-       lw      $20,%gottprel($7)($28)
+       lw      $20,%gottprel(a3)($28)
        nop
        addu    $3,$20,$3
        lb      $4,0($3)
@@ -425,4 +425,4 @@
        .word   2
        .word   0
        .word   3
-       .ident  "GCC: (GNU) 4.1.0 20051021 (experimental)"
+       .ident  "GCC: (GNU) 4.1.0 20050823 (experimental)"

While the GCC version I am using for glibc is older, the newer version
I am using for my uClibc work with binutils-2.16.1 which is the same
for glibc. I am using 2.6.12 kernel headers for uClibc and 2.6.13-rc6
for glibc, but when I took a diff between them, I could see nothing that
I felt would impact anything like that above. So, I began digging through
GCC guts, but could not figure out why I get the symbolic register
representations in the glibc compiled code and not in my stuff. Can
anyone shed some light as to where I can begin looking for the issue?
Thanks.

-Steve

Reply via email to