mirror of
https://github.com/fluencelabs/musl
synced 2025-05-29 07:31:53 +00:00
if dynamic linker's relro mprotect call fails, include reason in message
This commit is contained in:
parent
fa7248c971
commit
436d3723af
@ -781,7 +781,7 @@ static void reloc_all(struct dso *p)
|
|||||||
if (p->relro_start != p->relro_end &&
|
if (p->relro_start != p->relro_end &&
|
||||||
mprotect(p->base+p->relro_start, p->relro_end-p->relro_start, PROT_READ) < 0) {
|
mprotect(p->base+p->relro_start, p->relro_end-p->relro_start, PROT_READ) < 0) {
|
||||||
snprintf(errbuf, sizeof errbuf,
|
snprintf(errbuf, sizeof errbuf,
|
||||||
"Error relocating %s: RELRO protection failed",
|
"Error relocating %s: RELRO protection failed: %m",
|
||||||
p->name);
|
p->name);
|
||||||
if (runtime) longjmp(*rtld_fail, 1);
|
if (runtime) longjmp(*rtld_fail, 1);
|
||||||
dprintf(2, "%s\n", errbuf);
|
dprintf(2, "%s\n", errbuf);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user