]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commit
elf2flt: add patch to fix ld.real search logic
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 13 Aug 2017 21:32:38 +0000 (23:32 +0200)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tue, 15 Aug 2017 15:34:36 +0000 (17:34 +0200)
commit24cc8585aa51794be72ad1d9691aa3ab7b534b00
treec4d9320b4fd44bc905d92d51a7f47b7e66fbbd83
parent978724d8cf487f285c85473e75482ae6a618a2a6
elf2flt: add patch to fix ld.real search logic

elf2flt contains a program called ld-elf2flt, which gets installed as
a replacement for ld, with ld renamed to ld.real. This program
therefore calls ld.real internally.

The logic to find ld.real worked fine for:

 - bin/TARGET_ALIAS-ld
 - TARGET_ALIAS/bin/ld

However, it failed badly if bin/SIMPLER_TARGET_ALIAS-ld is used, as
symlink to bin/TARGET_ALIAS-ld. For example:

$ ./output/host/bin/arm-buildroot-uclinux-uclibcgnueabi-ld
/home/thomas/buildroot/buildroot/output/host/bin/../arm-buildroot-uclinux-uclibcgnueabi/bin/ld.real: no input files

$ ./output/host/bin/arm-linux-ld
arm-linux-ld (ld-elf2flt): error trying to exec '/home/thomas/buildroot/buildroot/output/host/bin/ld.real': execvp: No such file or directory

$ ./output/host/arm-buildroot-uclinux-uclibcgnueabi/bin/ld
/home/thomas/buildroot/buildroot/output/host/arm-buildroot-uclinux-uclibcgnueabi/bin/ld.real: no input files

This commit fixes that by adding a patch that adjusts the ld-elf2flt
logic to properly cope with this situation.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/elf2flt/0001-ld-elf2flt-behave-properly-when-called-with-a-name-d.patch [new file with mode: 0644]