[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/20995] Read-only data in ELF libraries may be remapped writable
From: |
amodra at gmail dot com |
Subject: |
[Bug ld/20995] Read-only data in ELF libraries may be remapped writable at runtime |
Date: |
Sat, 25 Feb 2017 17:40:52 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=20995
--- Comment #19 from Alan Modra <amodra at gmail dot com> ---
Created attachment 9855
--> https://sourceware.org/bugzilla/attachment.cgi?id=9855&action=edit
possible nios2 fix
Sandra, looking over my patch again, I think it is most likely this hunk.
- else if (CONST_STRNEQ (name, ".got"))
- got = s->size != 0;
- else if (strcmp (name, ".dynbss") != 0)
+ else if (s == htab->root.sgot
+ || s == htab->root.sgotplt)
+ {
+ if (s->size != 0)
+ got = TRUE;
+ }
+ else if (s != htab->root.sdynbss
+ && s != htab->root.sdynrelro)
The CONST_STRNEQ matches both .got and .got.plt and I thought it was a bug that
the "got" flag could be set on finding a non-zero size .got section present
then cleared the next time around the loop on finding a zero size .got.plt. Or
vice versa. My guess at the time was that you wanted "got" set (results in
DT_PLTGOT) for either section, but it's possible you only want it set for
.got.plt. If so then it was indeed a bug that the name compare matched both
.got and .got.plt, but I fixed it the wrong way..
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/20995] Read-only data in ELF libraries may be remapped writable at runtime, cvs-commit at gcc dot gnu.org, 2017/02/02
- [Bug ld/20995] Read-only data in ELF libraries may be remapped writable at runtime, sandra at codesourcery dot com, 2017/02/25
- [Bug ld/20995] Read-only data in ELF libraries may be remapped writable at runtime,
amodra at gmail dot com <=
- [Bug ld/20995] Read-only data in ELF libraries may be remapped writable at runtime, sandra at codesourcery dot com, 2017/02/25
- [Bug ld/20995] Read-only data in ELF libraries may be remapped writable at runtime, sandra at codesourcery dot com, 2017/02/25
- [Bug ld/20995] Read-only data in ELF libraries may be remapped writable at runtime, amodra at gmail dot com, 2017/02/25
- [Bug ld/20995] Read-only data in ELF libraries may be remapped writable at runtime, sandra at codesourcery dot com, 2017/02/26
- [Bug ld/20995] Read-only data in ELF libraries may be remapped writable at runtime, amodra at gmail dot com, 2017/02/26
- [Bug ld/20995] Read-only data in ELF libraries may be remapped writable at runtime, amodra at gmail dot com, 2017/02/26
- [Bug ld/20995] Read-only data in ELF libraries may be remapped writable at runtime, amodra at gmail dot com, 2017/02/26
- [Bug ld/20995] Read-only data in ELF libraries may be remapped writable at runtime, amodra at gmail dot com, 2017/02/26
- [Bug ld/20995] Read-only data in ELF libraries may be remapped writable at runtime, sandra at codesourcery dot com, 2017/02/26
- [Bug ld/20995] Read-only data in ELF libraries may be remapped writable at runtime, amodra at gmail dot com, 2017/02/26