From 174cb243e552eb2e41da1c74f2b9ff6847945da1 Mon Sep 17 00:00:00 2001 From: Votre Nom Date: Sun, 5 Feb 2023 18:54:58 +0100 Subject: [PATCH] lld seems to need all TLS sections defined in header --- bindings/solo5_hvt.lds | 3 ++- bindings/solo5_muen.lds | 3 ++- bindings/solo5_spt.lds | 3 ++- bindings/solo5_stub.lds | 3 ++- bindings/solo5_virtio.lds | 3 ++- bindings/solo5_xen.lds | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/bindings/solo5_hvt.lds b/bindings/solo5_hvt.lds index f081bba8..60461456 100644 --- a/bindings/solo5_hvt.lds +++ b/bindings/solo5_hvt.lds @@ -41,6 +41,7 @@ PHDRS { data PT_LOAD; tdata PT_TLS; + tbss PT_TLS; note.not_openbsd PT_NOTE; /* Must come first. */ note.abi PT_NOTE; note.manifest PT_NOTE; @@ -131,7 +132,7 @@ SECTIONS { .tbss (NOLOAD) : { *(.tbss) - } + } :tbss . = ALIGN(CONSTANT(MAXPAGESIZE)); _ebss = .; diff --git a/bindings/solo5_muen.lds b/bindings/solo5_muen.lds index dcabcedf..523d5d6e 100644 --- a/bindings/solo5_muen.lds +++ b/bindings/solo5_muen.lds @@ -40,6 +40,7 @@ PHDRS { rodata PT_LOAD; data PT_LOAD; tdata PT_TLS; + tbss PT_TLS; note.not_openbsd PT_NOTE; /* Must come first. */ note.abi PT_NOTE; note.manifest PT_NOTE; @@ -130,7 +131,7 @@ SECTIONS { .tbss (NOLOAD) : { *(.tbss) - } + } :tbss . = ALIGN(CONSTANT(MAXPAGESIZE)); _ebss = .; diff --git a/bindings/solo5_spt.lds b/bindings/solo5_spt.lds index 4a3a4cd4..af589646 100644 --- a/bindings/solo5_spt.lds +++ b/bindings/solo5_spt.lds @@ -39,6 +39,7 @@ PHDRS { FLAGS values come from PF_x in elf.h */ data PT_LOAD; tdata PT_TLS; + tbss PT_TLS; note.not_openbsd PT_NOTE; /* Must come first. */ note.abi PT_NOTE; note.manifest PT_NOTE; @@ -129,7 +130,7 @@ SECTIONS { .tbss (NOLOAD): { *(.tbss) - } + } :tbss . = ALIGN(CONSTANT(MAXPAGESIZE)); _ebss = .; diff --git a/bindings/solo5_stub.lds b/bindings/solo5_stub.lds index c5c50be7..09575996 100644 --- a/bindings/solo5_stub.lds +++ b/bindings/solo5_stub.lds @@ -39,6 +39,7 @@ PHDRS { FLAGS values come from PF_x in elf.h */ data PT_LOAD; tdata PT_TLS; + tbss PT_TLS; note.not_openbsd PT_NOTE; /* Must come first. */ note.abi PT_NOTE; note.manifest PT_NOTE; @@ -129,7 +130,7 @@ SECTIONS { .tbss (NOLOAD): { *(.tbss) - } + } :tbss . = ALIGN(CONSTANT(MAXPAGESIZE)); _ebss = .; diff --git a/bindings/solo5_virtio.lds b/bindings/solo5_virtio.lds index b15dfa11..d9f70128 100644 --- a/bindings/solo5_virtio.lds +++ b/bindings/solo5_virtio.lds @@ -39,6 +39,7 @@ PHDRS { FLAGS values come from PF_x in elf.h */ data PT_LOAD; tdata PT_TLS; + tbss PT_TLS; note.not_openbsd PT_NOTE; /* Must come first. */ note.abi PT_NOTE; note.manifest PT_NOTE; @@ -130,7 +131,7 @@ SECTIONS { .tbss (NOLOAD) : { *(.tbss) - } + } :tbss . = ALIGN(CONSTANT(MAXPAGESIZE)); _ebss = .; diff --git a/bindings/solo5_xen.lds b/bindings/solo5_xen.lds index 5ecac8bf..68c4434d 100644 --- a/bindings/solo5_xen.lds +++ b/bindings/solo5_xen.lds @@ -39,6 +39,7 @@ PHDRS { FLAGS values come from PF_x in elf.h */ data PT_LOAD; tdata PT_TLS; + tbss PT_TLS; note.not_openbsd PT_NOTE; /* Must come first. */ note.xen PT_NOTE; note.abi PT_NOTE; @@ -135,7 +136,7 @@ SECTIONS { .tbss (NOLOAD) : { *(.tbss) - } + } :tbss . = ALIGN(CONSTANT(MAXPAGESIZE)); _ebss = .;