ryantimwilson / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone
b9a53a
From 9f259b46b760b2aa08ac1fe76fe61df514e2768f Mon Sep 17 00:00:00 2001
b9a53a
From: Michal Sekletar <msekleta@redhat.com>
b9a53a
Date: Tue, 3 Sep 2019 10:05:42 +0200
b9a53a
Subject: [PATCH] buildsys: don't garbage collect sections while linking
b9a53a
b9a53a
gc-sections is actually very aggressive and garbage collects ELF
b9a53a
sections used by annobin gcc plugin and annocheck then reports gaps in
b9a53a
coverage. Let's drop that linker flag.
b9a53a
b9a53a
RHEL-only
b9a53a
b9a53a
Resolves: #1748258
b9a53a
---
b9a53a
 meson.build | 2 --
b9a53a
 1 file changed, 2 deletions(-)
b9a53a
b9a53a
diff --git a/meson.build b/meson.build
b9a53a
index 04b461dcd4..613a5133b6 100644
b9a53a
--- a/meson.build
b9a53a
+++ b/meson.build
b9a53a
@@ -357,8 +357,6 @@ if get_option('buildtype') != 'debug'
b9a53a
                 '-ffunction-sections',
b9a53a
                 '-fdata-sections',
b9a53a
         ]
b9a53a
-
b9a53a
-        possible_link_flags += '-Wl,--gc-sections'
b9a53a
 endif
b9a53a
 
b9a53a
 add_project_arguments(cc.get_supported_arguments(possible_cc_flags), language : 'c')