elf2flt icon indicating copy to clipboard operation
elf2flt copied to clipboard

elf2flt: handle binutils >= 2.34

Open RomainNaour opened this issue 5 years ago • 1 comments

The latest Binutils release (2.34) is not compatible with elf2flt due to a change in bfd_section_* macros. The issue has been reported to the Binutils mailing list but Alan Modra recommend to bundle libbfd library sources into each projects using it [1]. That's because the API is not stable over the time without any backward compatibility guaranties.

On the other hand, the elf2flt tools needs to support modified version of binutils for specific arch/target [2].

Add two tests in the configure script to detect this API change in order to support binutils < 2.34 and binutils >= 2.34.

[1] https://sourceware.org/ml/binutils/2020-02/msg00044.html [2] https://github.com/uclinux-dev/elf2flt/issues/14

Signed-off-by: Romain Naour [email protected]

RomainNaour avatar Feb 12 '20 20:02 RomainNaour

were you planning on refreshing this ?

vapier avatar Aug 18 '21 21:08 vapier

This looks to have been sitting here for quite a while now. I have manually resolved the conflict, so it is at least clean and ready to be applied. As far as I can tell Romain addressed all feedback.

gregungerer avatar Mar 08 '23 13:03 gregungerer

tbh, i didn't really notice the updated pushes since the open comments weren't marked resolved, so was waiting for OP to do so. if you think issues are resolved, and you've rebased the work, then let's merge it.

should update the unittest coverage (i.e. uclinux-dev/prebuilts-binutils-libs) to make sure things work & stay working.

vapier avatar Mar 14 '23 06:03 vapier

Further testing has found at least one problem. This only works if you use the single --with-binutils-build-dir configure form. If you specify each of the --with-libbfd/--with-libiberty/etc configure options (but no --with-binutils-build-dir option) it will fail to detect the version of binutils correctly.

gregungerer avatar Mar 22 '23 14:03 gregungerer

Oh, and the in-tree configure script needs to be regenerated too.

gregungerer avatar Mar 22 '23 14:03 gregungerer

hmm, we should add those scenarios to our CI tests

vapier avatar Mar 23 '23 14:03 vapier

This pull request updated to fix --with-binutils-build-dir case and the configure script re-generated and applied to main.

gregungerer avatar Apr 04 '23 04:04 gregungerer