https://sourceware.org/bugzilla/show_bug.cgi?id=16949
Bug ID: 16949 Summary: arm-none-eabi-objdump segfaults when disassembling ARM BE elf file Product: binutils Version: 2.25 (HEAD) Status: NEW Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: andrew.smirnov at gmail dot com Created attachment 7601 --> https://sourceware.org/bugzilla/attachment.cgi?id=7601&action=edit ARMBE ELF file causing the segfault Hi, I am compiling a very simplistic firmware for TI TMS570, which is a Cortex-R4 MCU that operates in Big-Endian mode. The firmware I am trying to write needs to be linked against binary-only library provided by TI which I believe was built using TI CodeComplser toolchain(non GCC) Host machine is: $ uname -a Linux charmander 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04 LTS Release: 14.04 Codename: trusty The code of the example is: #include <F021.h> int start(void) { return Fapi_issueAsyncCommandWithAddress(1, (uint32_t *)0); } And I am building it as follows: arm-none-eabi-gcc -Wall -std=gnu99 -O0 -flto -fshort-wchar -g -DTMS570LS31 -mthumb -march=armv7-r -mtune=cortex-r4 -mbig-endian -nostdlib -I~/ti/hercules/F021FlashApi-02.00.01/include -c main.c arm-none-eabi-gcc main.o ~/ti/hercules/F021FlashApi-02.00.01/F021_API_CortexR4_BE.lib -mthumb -march=armv7-r -mtune=cortex-r4 -mbig-endian -nostdlib -g -gdwarf-2 -Ttms570ls31.ld -Tsections.ld -Wl,-Map=tms570ls31-helper.map -o tms570ls31-helper.elf Linker scripts used in this example are as follows: $ cat sections.ld ENTRY(start) SECTIONS { .text : { *(.text*) *(.rodata*) } > RAM __etext = .; .data : AT (__etext) { __data_start__ = .; *(.data*) } > RAM .bss : { . = ALIGN(4); __bss_start__ = .; *(.bss*) *(COMMON) . = ALIGN(4); __bss_end__ = .; } > RAM } $ cat tms570ls31.ld MEMORY { RAM (rwx) : ORIGIN = 0x08000000, LENGTH = 256K } So when I try to do arm-none-eabi-objdump -S tms570ls31-helper.elf It segfaults as soon as it starts disassembling the function from proprietary library(Fapi_issueAsyncCommandWithAddress). I tried both objdump from https://launchpad.net/gcc-arm-embedded and built form the latest master of binutils-gdb.git repository and both behaved exactly the same. I attached the elf file causing the problem. Let me know if I can provide any more additional information/assistance that would help. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils