Bug 23638 - LLVM lld creates absolute relocations when they should be relative
Summary: LLVM lld creates absolute relocations when they should be relative
Status: RESOLVED INVALID
Alias: None
Product: glibc
Classification: Unclassified
Component: dynamic-link (show other bugs)
Version: 2.28
: P2 normal
Target Milestone: ---
Assignee: Florian Weimer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-12 12:11 UTC by Florian Weimer
Modified: 2018-11-27 17:43 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Weimer 2018-09-12 12:11:06 UTC
Before this lld fix:

https://reviews.llvm.org/rL308681
https://llvm.org/viewvc/llvm-project?view=revision&revision=308681
https://github.com/llvm-project/lld/commit/1adba6d5d2f5f51d0719e81f71461437ecc1bd59

“
Fix symbol type with icf.

We were not looking at Repl and so thinking there was no output
section associated with the merged symbol. Because of that it was
produced as absolute.

This was found by an internal round of testing.
”

lld created invalid executables which happened to work with glibc before bug 19818 was fixed with this commit:

commit e7feec374c635b6a29d65c39ae5e1855528fed39
Author: Maciej W. Rozycki <macro@mips.com>
Date:   Wed Apr 4 23:09:37 2018 +0100

    elf: Correct absolute (SHN_ABS) symbol run-time calculation [BZ #19818]

Running such invalid binaries on a fixed glibc will result in crashes.
Comment 1 Florian Weimer 2018-09-12 12:12:34 UTC
This bug is just here to capture the information in glibc Bugzilla.