Bug 2436257 - Many "read-only segment has dynamic relocations" on i686 with recent binutils
Summary: Many "read-only segment has dynamic relocations" on i686 with recent binutils
Keywords:
Status: CLOSED DUPLICATE of bug 2428281
Alias: None
Product: Fedora
Classification: Fedora
Component: binutils
Version: rawhide
Hardware: i686
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Nick Clifton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-02-03 08:44 UTC by Nicolas Chauvet (kwizart)
Modified: 2026-02-03 15:51 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2026-02-03 15:51:51 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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 ***


Note You need to log in before you can comment on or make changes to this bug.