arm-none-eabi-objcopy -O verilog fails to write a section at the correct address

Bug #1462300 reported by sgarnier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Arm Embedded Toolchain
New
Undecided
Unassigned

Bug Description

I have a function linked at 0x82_000 (main)
It is reported as such when using the following commands:

 arm-none-eabi-objdump -S nvmctrl_basic_rww_VCS_RTL_TEST_RAWWB.elf > out.dis
 arm-none-eabi-nm -S nvmctrl_basic_rww_VCS_RTL_TEST_RAWWB.elf

But when I use objcopy to generate the image loadable by a verilog simulator (readmemh function) then my main function is wrongly mapped at 0xE000

To see the issue you can execute the following:
arm-none-eabi-objcopy --only-section=".sbankh" -O verilog nvmctrl_basic_rww_VCS_RTL_TEST_RAWWB.elf out.hex

The code should be @82_000 but it is located at @C000+padded with 0 (+0x2000).

Revision history for this message
sgarnier (sylvain-garnier) wrote :
Revision history for this message
sgarnier (sylvain-garnier) wrote :

Adding linker script

Revision history for this message
sgarnier (sylvain-garnier) wrote :

Added C file with main

Revision history for this message
sgarnier (sylvain-garnier) wrote :

arm-none-eabi-objcopy -V:

GNU objcopy (GNU Tools for ARM Embedded Processors) 2.23.2.20140529
Copyright 2012 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

Just checkouted the latest ARM GCC release. I will check it now.

Revision history for this message
sgarnier (sylvain-garnier) wrote :

Same issue with:

arm-none-eabi-objcopy -V
GNU objcopy (GNU Tools for ARM Embedded Processors) 2.24.0.20150304
Copyright 2013 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

But I didn't regenerate the elf file with this version.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.