[Top][All Lists]

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

[Bug binutils/16949] New: arm-none-eabi-objdump segfaults when disassemb

From: andrew.smirnov at gmail dot com
Subject: [Bug binutils/16949] New: arm-none-eabi-objdump segfaults when disassembling ARM BE elf file
Date: Thu, 15 May 2014 18:00:55 +0000


            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


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

Linker scripts used in this example are as follows:

$ cat sections.ld 

    .text :
    } > RAM

    __etext = .;

    .data : AT (__etext)
        __data_start__ = .;
    } > RAM

    .bss :
        . = ALIGN(4);
        __bss_start__ = .;
        . = ALIGN(4);
        __bss_end__ = .;
    } > RAM

$ cat tms570ls31.ld 
    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

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

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.

reply via email to

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