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

            Bug ID: 23699
           Summary: ihex output fails for mipsel-elf-objcopy
           Product: binutils
           Version: 2.31
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: sowaac.rhn at porcupinefactory dot org
  Target Milestone: ---

Created attachment 11268
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11268&action=edit
Linker script used to create the un-ihex-able elf file

Trying to convert elf to ihex files fails:

$ mipsel-elf-gcc -nostdlib -T./link.ld ./main.c -o out.elf
$ mipsel-elf-objcopy -O ihex out.elf out.hex
mipsel-elf-objcopy: out.hex: address 0xffffffff9d005a00 out of range for Intel
Hex file
mipsel-elf-objcopy:out.hex: bad value

The reason is that ihex only supports 32-bit values, and the elf32-littlempis
bfd sign-extends vma addresses, causing them to go out of range.

The behaviour can be tested with the source file and attached linker script:

```
int main()
{
    return 0;
}
```

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

Reply via email to