buildsys: don't garbage collect sections while linking
authorMichal Sekletar <msekleta@redhat.com>
Tue, 3 Sep 2019 08:05:42 +0000 (10:05 +0200)
committerThe Plumber <50238977+systemd-rhel-bot@users.noreply.github.com>
Mon, 21 Oct 2019 09:22:12 +0000 (11:22 +0200)
gc-sections is actually very aggressive and garbage collects ELF
sections used by annobin gcc plugin and annocheck then reports gaps in
coverage. Let's drop that linker flag.

RHEL-only

Resolves: #1748258

meson.build

index 04b461dcd412bdfc5df8faf675415921d0fbc6b5..613a5133b6bf827de2530dbaca0285d40b80917a 100644 (file)
@@ -357,8 +357,6 @@ if get_option('buildtype') != 'debug'
                 '-ffunction-sections',
                 '-fdata-sections',
         ]
-
-        possible_link_flags += '-Wl,--gc-sections'
 endif
 
 add_project_arguments(cc.get_supported_arguments(possible_cc_flags), language : 'c')