Bug 2436257

Summary: Many "read-only segment has dynamic relocations" on i686 with recent binutils
Product: [Fedora] Fedora Reporter: Nicolas Chauvet (kwizart) <kwizart>
Component: binutilsAssignee: Nick Clifton <nickc>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: dvlasenk, fweimer, jakub, josmyers, nickc, sipoyare, suraj.ghimire7
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-02-03 15:51:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nicolas Chauvet (kwizart) 2026-02-03 08:44:23 UTC
When building some i686 asm code in fedora and 3rd part, there are many occurence of the following errors.

/usr/bin/ld.bfd: common/x86/dct-a-8.o: warning: relocation in read-only section `.text'
/usr/bin/ld.bfd: error: read-only segment has dynamic relocations


Affected packages so far in Fedora:
ffmpeg (free)
xvidcore
patchelf

3rd part:
ffmpeg
x265
x264
...

Reproduced with current binutils in f44 and newer (still in testing) binutils-2.45.90-1.fc44

Reproducible: Always

Comment 1 Nicolas Chauvet (kwizart) 2026-02-03 09:18:13 UTC
Current workaround is to use LDFLAGS+="-Wl,-z,notext"

Comment 2 Nick Clifton 2026-02-03 15:08:42 UTC
Hi Nicolas,

This change is a result of this ticket.

https://bugzilla.redhat.com/show_bug.cgi?id=2428281

Allowing relocations against read-only segments is a potential security vulnerability, which is why the change was made.  As you have mentioned using "-W,-z,notext" will work around this problem, although if this is done it would be useful to include a comment explaining why the vulnerability is not important.

I would like to close this ticket as NOT-A-BUG or possibly as a DUPLICATE.  Do you agree to this ?

Cheers
  Nick

Comment 3 Nicolas Chauvet (kwizart) 2026-02-03 15:51:51 UTC
Thanks for the infos on this.
This seems a duplicate of your mentioned bug.

That said xvidcore (or others) obviously always had this issue on i686, and none bothered. (or not loud enough).
If now making the build fails and it's only detected by the mass-rebuild, then this leave very few time for a better fix.

And having a build failing means some underlying dependencies might fail to land in-time for f44.

I will try to do by best to land the appropriate fix though.
Thanks again for the answer.

*** This bug has been marked as a duplicate of bug 2428281 ***