[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH v3 3/4] build: disable build-id for libraries too



This looks fine, I agree we don't need the build ids, especially not in the libraries.

Reviewed-by: Florian Schmidt <florian.schmidt@xxxxxxxxx>

On 5/15/19 3:53 PM, Yuri Volchkov wrote:
The option --build-id=none is enabled only for LDFLAGS, but not for
LIBLDFLAGS. This creates section '.note.gnu.build-id' for every
library, and this section makes it to the final image, and appears at
random place.

Signed-off-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx>
---
  Makefile.uk               | 2 +-
  plat/kvm/arm/link64.lds.S | 1 +
  plat/kvm/x86/link64.lds.S | 2 ++
  plat/xen/arm/link32.lds.S | 2 ++
  plat/xen/x86/link64.lds.S | 1 +
  5 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/Makefile.uk b/Makefile.uk
index d675c35f..f271cd1f 100644
--- a/Makefile.uk
+++ b/Makefile.uk
@@ -20,7 +20,7 @@ CXXINCLUDES += -nostdinc -nostdlib -I$(CONFIG_UK_BASE)/include
  # Set the text and data sections to be readable and writable. Also,
  # do not page-align the data segment. If the output format supports
  # Unix style magic numbers, mark the output as OMAGIC.
-LIBLDFLAGS  += -nostdinc -nostdlib -Wl,--omagic -Wl,-r -Wl,-d
+LIBLDFLAGS  += -nostdinc -nostdlib -Wl,--omagic -Wl,-r -Wl,-d 
-Wl,--build-id=none
  LDFLAGS     += -nostdinc -nostdlib -Wl,--omagic -Wl,--build-id=none
CFLAGS-$(CONFIG_OPTIMIZE_NONE) += -O0 -fno-optimize-sibling-calls -fno-tree-vectorize
diff --git a/plat/kvm/arm/link64.lds.S b/plat/kvm/arm/link64.lds.S
index 43aea4bd..8157271b 100644
--- a/plat/kvm/arm/link64.lds.S
+++ b/plat/kvm/arm/link64.lds.S
@@ -152,4 +152,5 @@ SECTIONS {
        }
_end = .;
+       /DISCARD/ : { *(.note.gnu.build-id) }
  }
diff --git a/plat/kvm/x86/link64.lds.S b/plat/kvm/x86/link64.lds.S
index 9cad5e16..10951c21 100644
--- a/plat/kvm/x86/link64.lds.S
+++ b/plat/kvm/x86/link64.lds.S
@@ -93,4 +93,6 @@ SECTIONS
        }
_end = .;
+
+       /DISCARD/ : { *(.note.gnu.build-id) }
  }
diff --git a/plat/xen/arm/link32.lds.S b/plat/xen/arm/link32.lds.S
index db26bf94..6b038411 100644
--- a/plat/xen/arm/link32.lds.S
+++ b/plat/xen/arm/link32.lds.S
@@ -143,4 +143,6 @@ SECTIONS
        .stab.index 0 : { *(.stab.index) }
        .stab.indexstr 0 : { *(.stab.indexstr) }
        .comment 0 : { *(.comment) }
+
+       /DISCARD/ : { *(.note.gnu.build-id) }
  }
diff --git a/plat/xen/x86/link64.lds.S b/plat/xen/x86/link64.lds.S
index 9823f469..76b33972 100644
--- a/plat/xen/x86/link64.lds.S
+++ b/plat/xen/x86/link64.lds.S
@@ -96,4 +96,5 @@ SECTIONS
                *(.exitcall.exit)
        }
        */
+       /DISCARD/ : { *(.note.gnu.build-id) }
  }


--
Dr. Florian Schmidt
フローリアン・シュミット
Research Scientist,
Systems and Machine Learning Group
NEC Laboratories Europe
Kurfürsten-Anlage 36, D-69115 Heidelberg
Tel.     +49 (0)6221 4342-265
Fax:     +49 (0)6221 4342-155
e-mail:  florian.schmidt@xxxxxxxxx
============================================================
Registered at Amtsgericht Mannheim, Germany, HRB728558

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.