bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/32049] New: objdump --disassemble=functionName --reloc inc


From: streetster at gmail dot com
Subject: [Bug binutils/32049] New: objdump --disassemble=functionName --reloc includes relocations from previous function
Date: Sun, 04 Aug 2024 07:34:53 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=32049

            Bug ID: 32049
           Summary: objdump --disassemble=functionName --reloc includes
                    relocations from previous function
           Product: binutils
           Version: 2.38
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: streetster at gmail dot com
  Target Milestone: ---

Created attachment 15659
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15659&action=edit
example object file

This is the output when disassembling the attached 'target.o' file. The object
has multiple functions, but we are only interested in one of them. There are 3
relocations included (0x4, 0xa0, 0xf0) that do not apply to the function being
disassembled - I don't think they should be included in the output.


$ mips-linux-gnu-objdump --disassemble=eMessageNextGyouMaxGet --reloc target.o

target.o:     file format elf32-tradlittlemips


Disassembly of section .text:

00000138 <eMessageNextGyouMaxGet>:
     138:       27bdffe0        addiu   sp,sp,-32
                        4: R_MIPS_GPREL16       D_004DA918
                        a0: R_MIPS_26   xglFontGetSPcodeSize
                        f0: R_MIPS_26   .text
     13c:       0080102d        move    v0,a0
     140:       ffb00000        sd      s0,0(sp)
     144:       0000802d        move    s0,zero
     148:       ffb10008        sd      s1,8(sp)
     14c:       2411001f        li      s1,31
     150:       ffbf0010        sd      ra,16(sp)
     154:       00000000        nop
     158:       0040202d        move    a0,v0
     15c:       0c000014        jal     50 <eMessageNextGyou>
                        15c: R_MIPS_26  .text
     160:       26100001        addiu   s0,s0,1
     164:       80430000        lb      v1,0(v0)
     168:       24450001        addiu   a1,v0,1
     16c:       10600003        beqz    v1,17c <eMessageNextGyouMaxGet+0x44>
     170:       3864000a        xori    a0,v1,0xa
     174:       1471fff8        bne     v1,s1,158 <eMessageNextGyouMaxGet+0x20>
     178:       00a4100a        movz    v0,a1,a0
     17c:       0200102d        move    v0,s0
     180:       dfb00000        ld      s0,0(sp)
     184:       dfb10008        ld      s1,8(sp)
     188:       dfbf0010        ld      ra,16(sp)
     18c:       03e00008        jr      ra
     190:       27bd0020        addiu   sp,sp,32
     194:       00000000        nop

The behaviour is the same on binutils 2.42.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]