• Bug#1108936: binutils-avr: Converting hex into elf using avr-objcopy gi

    From Joris Putcuyps@1:229/2 to All on Tue Jul 8 12:00:01 2025
    From: [email protected]

    Package: binutils-avr
    Version: 2.43.50.20250108-1
    Severity: important
    X-Debbugs-Cc: [email protected]

    Dear Maintainer,

    Currently I'm using the microchip avr-gcc-7.3. Planning to update to
    a more up-to-date compiler I updated to trixie which provides
    avr-gcc-14.2. Now avr-objcopy appears to fail when converting the hex
    into elf: "/usr/bin/avr-objcopy -I ihex firmware.hex -O binary
    firmware.bin" gives "invalid operation".

    I've used zakkemble, microchip and my own cross toolchain with
    success.


    -- System Information:
    Debian Release: 13.0
    APT prefers testing-security
    APT policy: (500, 'testing-security'), (500, 'testing')
    Architecture: amd64 (x86_64)

    Kernel: Linux 6.12.33+deb13-amd64 (SMP w/4 CPU threads; PREEMPT)
    Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
    Shell: /bin/sh linked to /usr/bin/dash
    Init: systemd (via /run/systemd/system)
    LSM: AppArmor: enabled

    Versions of packages binutils-avr depends on:
    ii libc6 2.41-9
    ii libzstd1 1.5.7+dfsg-1
    ii zlib1g 1:1.3.dfsg+really1.3.1-1+b1

    binutils-avr recommends no packages.

    Versions of packages binutils-avr suggests:
    ii binutils 2.44-3

    -- no debconf information

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Joris Putcuyps@1:229/2 to All on Tue Jul 8 18:20:01 2025
    From: [email protected]

    Small correction on the title, it should be: "Converting hex into bin using avr-objcopy gives invalid operation error".

    Some further research I found the following:

    https://linux.debian.bugs.dist.narkive.com/Dy11dvaC/bug-1093895-objcopy-fails-with-invalid-operation


    https://fossies.org/linux/binutils/ChangeLog.git

    2025-01-27 Alan Modra <[email protected]>

    57

    58 PR32599, objcopy -I ihex:

    invalid operation

    59 Restores ihex get_symtab_upper_bound to what it was prior to commit

    60 394a3f4f8d. This will enable objcopy of other no-sym formats too.

    61

    62 PR 32599

    63 * libbfd-in.h (_bfd_nosymbols_get_symtab_upper_bound): Define

    64 as _bfd_long_bfd_0.

    65 * libbfd.h: Regenerate.

    66

    67 (cherry picked from commit fd45211245d0f1027a0c3ab606e3253eda779e68)


    [continued in next message]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)