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