bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/20659] New: Objcopy and change section lma failing


From: neil.jones at imgtec dot com
Subject: [Bug binutils/20659] New: Objcopy and change section lma failing
Date: Fri, 30 Sep 2016 08:54:55 +0000

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

            Bug ID: 20659
           Summary: Objcopy and change section lma failing
           Product: binutils
           Version: 2.24
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: neil.jones at imgtec dot com
  Target Milestone: ---

Created attachment 9545
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9545&action=edit
elf file with .MIPS.abiflags section.

objcopy fails when trying to adjust the lma of the section ".MIPS.abiflags"

The relevant line:

--change-section-lma .MIPS.abiflags-0x80000000 \

The error:

BFD: hello_flash_physical.elf: warning: allocated section `.MIPS.abiflags' not
in segment

I thought this might be due to the period in the middle of the section name, I
have tried:

--change-section-lma ".MIPS.abiflags"-0x80000000 \
--change-section-lma '.MIPS.abiflags'-0x80000000 \
--change-section-lma .MIPS\.abiflags-0x80000000 \

all to no avail...

$ objdump -h -w hello_flash.elf | grep MIPS
11 .MIPS.abiflags 00000018  9d002cd8  9d002cd8  00012cd8

Objcopy version is 2.24.90:

    GNU objcopy (Codescape GNU Tools 2016.05-03 for MIPS MTI Bare Metal)
2.24.90 Copyright (C) 2014 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.

Full Command:

                objcopy         --change-section-lma .bootflash-0xA0000000 \
                                --change-section-lma
.exception_vector-0x80000000 \
                                --change-section-lma .text-0x80000000 \
                                --change-section-lma .init-0x80000000 \
                                --change-section-lma .fini-0x80000000 \
                                --change-section-lma .eh_frame-0x80000000 \
                                --change-section-lma .jcr-0x80000000 \
                                --change-section-lma .ctors-0x80000000 \
                                --change-section-lma .dtors-0x80000000 \
                                --change-section-lma .rodata-0x80000000 \
                                --change-section-lma .data-0x80000000 \
                                --change-section-lma .bss-0x80000000 \
                                --change-section-lma .startdata-0x80000000 \
                                --change-section-lma .MIPS.abiflags-0x80000000
\
                                pic32_hello_flash.elf
pic32_hello_flash_physical.elf

If I omit the change to .MIPS.abiflags all other sections LMA's get adjusted
correctly.

elf file is attached.

Cheers,

Neil.

-- 
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]