~ehmry/sigil

f517d86d1570d2913c36e199dc4cd8a1248046bb — Emery Hemingway 3 years ago 9124a0e elf-fixup
genodeSources: patch linker script for programs

The genode_dyn.ld script was creating a dynamic section of invalid
size, which causes problems with patchelf.
2 files changed, 19 insertions(+), 1 deletions(-)

M packages/genodelabs/default.nix
A packages/genodelabs/genode_dyn.ld.patch
M packages/genodelabs/default.nix => packages/genodelabs/default.nix +1 -1
@@ 30,7 30,7 @@ let
      version = upstreamSources.lastModifiedDate;
      src = upstreamSources;
      nativeBuildInputs = [ expect gnumake tcl ];
      patches = [ ./LIB.patch ./binary-labels.patch ];
      patches = [ ./LIB.patch ./binary-labels.patch ./genode_dyn.ld.patch ];
      configurePhase = ''
        patchShebangs ./tool
        substituteInPlace repos/base/etc/tools.conf \

A packages/genodelabs/genode_dyn.ld.patch => packages/genodelabs/genode_dyn.ld.patch +18 -0
@@ 0,0 1,18 @@
diff --git a/repos/base/src/ld/genode_dyn.ld b/repos/base/src/ld/genode_dyn.ld
index 5fa6ddc29e..2635c1644b 100644
--- a/repos/base/src/ld/genode_dyn.ld
+++ b/repos/base/src/ld/genode_dyn.ld
@@ -216,13 +216,6 @@ SECTIONS
   .dynamic        :
   {
     *(.dynamic)
-
-    /*
-     * Make sure to have a least one entry within the dynamic section, so the
-     * dynamic sgement point to something valid in case there are no dynamic
-     * symbols
-     */
-    LONG(0x0);
    } : rw : dynamic
 
   /* merge .got.plt and .got into .got, since the ARM toolchain for OKL4