[llvm-bugs] [Bug 43119] New: [MIPS][FreeBSD] non-ABS relocation in .mdebug.abi32

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Aug 26 19:57:44 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=43119

            Bug ID: 43119
           Summary: [MIPS][FreeBSD] non-ABS relocation in .mdebug.abi32
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: kevans at FreeBSD.org
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

Attempting to buildworld on FreeBSD/mips (32-bit); attempting to link libc
(clang+ld.lld setup) results in the following: 

--- libc.so.7.full ---   
ld: error: mcount.c:(.mdebug.abi32+0x0): has non-ABS relocation R_
MIPS_HI16 against symbol '_gp_disp'
cc: error: linker command failed with exit code 1 (use -v to see i
nvocation)                                                        
*** [libc.so.7.full] Error code 1



$ llvm-objdump90 -D mcount.o
[ ... snip ...]
Disassembly of section .mdebug.abi32:

00000000 _mcount:
       0: af a4 00 08                   sw      $4, 8($sp)
       4: af a5 00 0c                   sw      $5, 12($sp)
       8: af a6 00 10                   sw      $6, 16($sp)
       c: af a7 00 14                   sw      $7, 20($sp)
      10: af a1 00 00                   sw      $1, 0($sp)
      14: af bf 00 04                   sw      $ra, 4($sp)
      18: 03 e0 28 25                   move    $5, $ra
      1c: 0c 00 00 00                   jal     0 <_mcount>
      20: 00 20 20 25                   move    $4, $1
      24: 8f a4 00 08                   lw      $4, 8($sp)
      28: 8f a5 00 0c                   lw      $5, 12($sp)
      2c: 8f a6 00 10                   lw      $6, 16($sp)
      30: 8f a7 00 14                   lw      $7, 20($sp)
      34: 8f bf 00 04                   lw      $ra, 4($sp)
      38: 8f a1 00 00                   lw      $1, 0($sp)
      3c: 27 bd 00 08                   addiu   $sp, $sp, 8
      40: 03 e0 00 08                   jr      $ra
      44: 00 20 f8 25                   move    $ra, $1

Disassembly of section .rel.mdebug.abi32:

00000000 .rel.mdebug.abi32:
       0: 00 00 00 1c                   <unknown>
       4: 00 00 45 04                   <unknown>
[... snip ...]



$ readelf -a mcount.o | grep '\.mdebug'
  [ 4] .mdebug.abi32     PROGBITS        00000000 000244 000048 00      0   0 
1
  [ 5] .rel.mdebug.abi32 REL             00000000 0013d8 000008 08     25   4 
4
Relocation section (.rel.mdebug.abi32):

----

Let me know what else I can collect/provide. =)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190827/eeaa38a5/attachment.html>


More information about the llvm-bugs mailing list