Removed
Link Here
|
1 |
https://lists.sr.ht/~emersion/public-inbox/%3CCANvPQf_5qOdfbe4Tk029yVB6BHipmYfQnuuCVoTUv3N%3D2f8jfw%40mail.gmail.com%3E |
2 |
https://github.com/systemd/systemd/commit/945317a4b69d33752c9513bb8994fe8d5a786ea6 |
3 |
|
4 |
--- src/libsystemd/sd-bus/bus-error.h.orig 2021-01-06 13:56:51 UTC |
5 |
+++ src/libsystemd/sd-bus/bus-error.h |
6 |
@@ -28,11 +28,17 @@ int bus_error_set_errnofv(sd_bus_error *e, int error, |
7 |
* the bus error table, and BUS_ERROR_MAP_ELF_USE has to be used at |
8 |
* least once per compilation unit (i.e. per library), to ensure that |
9 |
* the error map is really added to the final binary. |
10 |
+ * |
11 |
+ * In addition, set the retain attribute so that the section cannot be |
12 |
+ * discarded by ld --gc-sections -z start-stop-gc. Older compilers would |
13 |
+ * warn for the unknown attribute, so just disable -Wattributes. |
14 |
*/ |
15 |
|
16 |
#define BUS_ERROR_MAP_ELF_REGISTER \ |
17 |
+ _Pragma("GCC diagnostic ignored \"-Wattributes\"") \ |
18 |
__attribute__ ((__section__("BUS_ERROR_MAP"))) \ |
19 |
__attribute__ ((__used__)) \ |
20 |
+ __attribute__ ((retain)) \ |
21 |
__attribute__ ((aligned(8))) |
22 |
|
23 |
#define BUS_ERROR_MAP_ELF_USE(errors) \ |
24 |
- |