aboutsummaryrefslogtreecommitdiff
path: root/opcodes/dis-buf.c
AgeCommit message (Collapse)AuthorFilesLines
2019-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2018-01-03Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2017-07-14binutils/objdump: Fix disassemble for huge elf sectionsRavi Bangoria1-3/+3
When elf section size is beyond unsigned int max value, objdump fails to disassemble from that section. Ex on PowerPC, $ objdump -h /proc/kcore Idx Name Size VMA 4 load2 100000000 c000000000000000 Here, size of load2 section is 0x100000000. Also note that, 0xc00.... address range is kernel space for PowerPC. Now let's try to disassemble do_sys_open() using /proc/kcore. $ cat /proc/kallsyms | grep -A1 -w do_sys_open c00000000036c000 T do_sys_open c00000000036c2d0 T SyS_open Before patch: $ objdump -d --start-address=0xc00000000036c000 --stop-address=0xc00000000036c2d0 /proc/kcore /proc/kcore: file format elf64-powerpcle Disassembly of section load2: c00000000036c000 <load2+0x36c000>: c00000000036c000: Address 0xc00000000036c000 is out of bounds. Fix this by changing type of 'buffer_length' from unsigned int to size_t. After patch: $ objdump -d --start-address=0xc00000000036c000 --stop-address=0xc00000000036c2d0 /proc/kcore /proc/kcore: file format elf64-powerpcle Disassembly of section load2: c00000000036c000 <load2+0x36c000>: c00000000036c000: fc 00 4c 3c addis r2,r12,252 c00000000036c004: 00 53 42 38 addi r2,r2,21248 c00000000036c008: a6 02 08 7c mflr r0 include/ * dis-asm.h (struct disassemble_info): Change type of buffer_length field to size_t. opcodes/ * dis-buf.c (buffer_read_memory): Change type of end_addr_offset, max_addr_offset and octets variables to size_t.
2017-01-02Update year range in copyright notice of all files.Alan Modra1-1/+1
2016-01-01Copyright update for binutilsAlan Modra1-1/+1
2015-08-12Remove trailing spaces in opcodesH.J. Lu1-1/+1
2015-06-22Stop "objdump -d" from disassembling past a symbolic address.Nick Clifton1-1/+3
include * dis-asm.h (struct disassemble_info): Add stop_vma field. binuti * objdump.c (disassemble_bytes): Set the stop_vma field in the disassemble_info structure when disassembling code sections with -d. * doc/binutils.texi (objdump): Document the discrepancy between -d and -D. opcodes * dis-buf.c (buffer_read_memory): Fail is stop_vma is set and the requested region lies beyond it. * bfin-dis.c (print_insn_bfin): Ignore sysop instructions when looking for 32-bit insns. * mcore-dis.c (print_insn_mcore): Disable stop_vma when reading data. * sh-dis.c (print_insn_sh): Likewise. * tic6x-dis.c (print_insn_tic6x): Disable stop_vma when reading blocks of instructions. * vax-dis.c (print_insn_vax): Check that the requested address does not clash with the stop_vma. tests * gas/arm/backslash-at.s: Add extra .byte directives so that the foo symbol does not appear to point half way through an instruction. * gas/arm/backslash-at.d: Update expected disassembly. * gas/i386/ilp32/x86-64-opcode-inval-intel.d: Likewise. * gas/i386/ilp32/x86-64-opcode-inval.d: Likewise. * gas/i386/x86-64-opcode-inval-intel.d: Likewise. * gas/i386/x86-64-opcode-inval.d: Likewise.
2015-01-02ChangeLog rotatation and copyright year updateAlan Modra1-1/+1
2014-03-05Update copyright yearsAlan Modra1-2/+1
2010-03-23 * dis-buf.c (buffer_read_memory): Give error for reading justJoseph Myers1-1/+2
before the start of memory.
2009-09-02update copyright datesAlan Modra1-1/+1
2007-07-05Change source files over to GPLv3.Nick Clifton1-9/+11
2005-07-01Update function declarations to ISO C90 formattingNick Clifton1-53/+23
2005-05-07Update the address and phone number of the FSFNick Clifton1-1/+1
2005-03-03update copyright datesAlan Modra1-1/+1
2005-02-142005-02-14 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu1-4/+9
* dis-buf.c (perror_memory): Use sprintf_vma to print out address.
2003-11-14Add new field to disassemble_info structure: symbol_is_valid() and use it toNick Clifton1-1/+10
skip displaying arm elf mapping symbols in disassembly output.
2001-08-09 * dis-buf.c (generic_strcat_address): Add missing prototype.Alan Modra1-0/+4
#if 0 the functions as it is unused.
2001-03-13Fix typos in ChangeLogs; fix dates in copyright noticesNick Clifton1-1/+2
2000-02-21This lot mainly cleans up `comparison between signed and unsigned' gccAlan Modra1-5/+5
warnings. One usused var, and a macro parenthesis fix too. Also check input sections are elf when doing gc in elflink.h.
2000-02-03octets vs bytes changes for binutilsTimothy Wall1-2/+8
1999-08-10 From Wally Iimura <iimura@microunity.com>:Ian Lance Taylor1-2/+5
* dis-buf.c (buffer_read_memory): Rewrite expression to avoid overflow at end of address space. (generic_print_address): Use sprintf_vma.
1999-07-11 * dis-buf.c: Add ATTRIBUTE_UNUSED as appropriate.Ian Lance Taylor1-4/+4
(generic_strcat_address): Add cast to avoid warning. * i386-dis.c: Initialize all structure fields to avoid warnings. Add ATTRIBUTE_UNUSED as appropriate.
1999-05-0319990502 sourceware importbinu_ss_19990502Richard Henderson1-0/+104