chiark / gitweb /
build-sys: hide magic section variables from exported symbols
authorKay Sievers <kay@vrfy.org>
Wed, 17 Jun 2015 05:23:31 +0000 (07:23 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:03:03 +0000 (10:03 +0100)
https://github.com/systemd/systemd/issues/234

src/libelogind/sd-bus/bus-error.c

index dac157be166a851123809239baf34941ad46c8bf..64a5a972aef719637fdf9e527eb094ae3797bdea 100644 (file)
@@ -70,9 +70,11 @@ BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_standard_errors[] = {
         SD_BUS_ERROR_MAP_END
 };
 
-/* GCC maps this magically to the beginning and end of the BUS_ERROR_MAP section */
-extern const sd_bus_error_map __start_BUS_ERROR_MAP[];
-extern const sd_bus_error_map __stop_BUS_ERROR_MAP[];
+/* GCC maps this magically to the beginning and end of the BUS_ERROR_MAP section.
+ * Hide them; for currently unknown reasons they get exported to the shared libries
+ * even without being listed in the sym file. */
+extern const sd_bus_error_map __start_BUS_ERROR_MAP[] _hidden_;
+extern const sd_bus_error_map __stop_BUS_ERROR_MAP[] _hidden_;
 
 /* Additional maps registered with sd_bus_error_add_map() are in this
  * NULL terminated array */