Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] DTPMOD mod fix for musl's rcrt0
@ 2017-12-14 10:57 Arvid E. Picciani
  2017-12-14 10:57 ` [Buildroot] [PATCH 2/2] enable static linking for libfuse Arvid E. Picciani
  2017-12-14 14:19 ` [Buildroot] [PATCH 1/2] DTPMOD mod fix for musl's rcrt0 Thomas Petazzoni
  0 siblings, 2 replies; 11+ messages in thread
From: Arvid E. Picciani @ 2017-12-14 10:57 UTC (permalink / raw)
  To: buildroot

See https://github.com/rust-lang/rust/issues/46566

Signed-off-by: Arvid E. Picciani <aep@exys.org>
---
 package/musl/0002-fix-rcrt1.o.patch | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 package/musl/0002-fix-rcrt1.o.patch

diff --git a/package/musl/0002-fix-rcrt1.o.patch b/package/musl/0002-fix-rcrt1.o.patch
new file mode 100644
index 0000000000..3dae65569f
--- /dev/null
+++ b/package/musl/0002-fix-rcrt1.o.patch
@@ -0,0 +1,26 @@
+diff --git a/ldso/dlstart.c b/ldso/dlstart.c
+index 4dbe178..0dd1d5a 100644
+--- a/ldso/dlstart.c
++++ b/ldso/dlstart.c
+@@ -128,16 +128,18 @@ void _dlstart_c(size_t *sp, size_t *dynv)
+ 	rel = (void *)(base+dyn[DT_REL]);
+ 	rel_size = dyn[DT_RELSZ];
+ 	for (; rel_size; rel+=2, rel_size-=2*sizeof(size_t)) {
+-		if (!IS_RELATIVE(rel[1], 0)) continue;
+ 		size_t *rel_addr = (void *)(base + rel[0]);
++		if (rel[1] == REL_DTPMOD) *rel_addr = 1;
++		if (!IS_RELATIVE(rel[1], 0)) continue;
+ 		*rel_addr += base;
+ 	}
+ 
+ 	rel = (void *)(base+dyn[DT_RELA]);
+ 	rel_size = dyn[DT_RELASZ];
+ 	for (; rel_size; rel+=3, rel_size-=3*sizeof(size_t)) {
+-		if (!IS_RELATIVE(rel[1], 0)) continue;
+ 		size_t *rel_addr = (void *)(base + rel[0]);
++		if (rel[1] == REL_DTPMOD) *rel_addr = 1;
++		if (!IS_RELATIVE(rel[1], 0)) continue;
+ 		*rel_addr = base + rel[2];
+ 	}
+ #endif
+
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-12-18  6:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-14 10:57 [Buildroot] [PATCH 1/2] DTPMOD mod fix for musl's rcrt0 Arvid E. Picciani
2017-12-14 10:57 ` [Buildroot] [PATCH 2/2] enable static linking for libfuse Arvid E. Picciani
2017-12-14 15:21   ` Thomas Petazzoni
2017-12-14 15:27     ` Arvid Picciani
2017-12-14 15:52       ` Thomas Petazzoni
2017-12-15 13:12         ` Stefan Fröberg
2017-12-15 13:22           ` Stefan Fröberg
2017-12-15 14:10           ` Thomas Petazzoni
2017-12-15 13:07       ` Stefan Fröberg
     [not found]         ` <CABukmmN5UjdWupf_8zuCkx13tuNVFxeD9AOE=cemfQ_Soe1AUQ@mail.gmail.com>
2017-12-18  6:25           ` Thomas Petazzoni
2017-12-14 14:19 ` [Buildroot] [PATCH 1/2] DTPMOD mod fix for musl's rcrt0 Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox