Skip to content

libiberty: return a copy of the name when lrealpath has no realpath - #20

Merged
codewiz merged 1 commit into
amiga-2.46from
fix/lrealpath-fallback
Sep 8, 2026
Merged

codewiz merged 1 commit into
amiga-2.46from
fix/lrealpath-fallback

Conversation

@codewiz

@codewiz codewiz commented Sep 7, 2026

Copy link
Copy Markdown
Member

Same fix as AmigaPorts/gcc for the binutils copy of libiberty: lrealpath has no code path for a host without realpath, canonicalize_file_name or Win32 and falls off the end of the function, which gcc at -Os compiles into a bare rts. The AmigaOS-hosted ld and bfd callers (ldfile.c, ldmain.c, opncls.c) got an undefined pointer back. Return a copy of the name instead.

On hosts without realpath, canonicalize_file_name or _WIN32 the function
fell off its end, so gcc at -Os compiled it to a bare rts and ld/bfd
callers got an undefined pointer back.
@codewiz
codewiz merged commit ce57ea2 into amiga-2.46 Sep 8, 2026
@codewiz
codewiz deleted the fix/lrealpath-fallback branch September 8, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants