Fangrui Song
8abf8d124a
[ELF] Don't resolve relocations referencing SHN_ABS to tombstone in non-SHF_ALLOC sections ( #79238 )
...
A SHN_ABS symbol has never been considered for
InputSection::relocateNonAlloc.
Before #74686 , the code did made it work in the absence of `-z
dead-reloc-in-nonalloc=`.
There is now a report about such SHN_ABS uses
(https://github.com/llvm/llvm-project/pull/74686#issuecomment-1904101711 )
and I think it makes sense for non-SHF_ALLOC to support SHN_ABS, like
SHF_ALLOC sections do.
```
// clang -g
__attribute__((weak)) int symbol;
int *foo() { return &symbol; }
0x00000023: DW_TAG_variable [2] (0x0000000c)
...
DW_AT_location [DW_FORM_exprloc] (DW_OP_addrx 0x0)
```
.debug_addr references `symbol`, which can be redefined by a symbol
assignment or --defsym to become a SHN_ABS symbol.
The problem is that `!sym.getOutputSection()` cannot discern SHN_ABS
from a symbol whose section has been discarded. Since commit
1981b1b6b9 , a symbol relative to a
discarded section is changed to `Undefined`, so the `SHN_ABS` check
become trivial.
We currently apply tombstone for a relocation referencing
`SharedSymbol`. This patch does not change the behavior.
2024-01-24 08:53:36 -08:00
..
2023-08-18 22:51:25 +00:00
2023-11-10 22:40:57 -08:00
2024-01-22 09:09:46 -08:00
2024-01-23 12:52:36 -08:00
2023-03-03 12:48:16 -08:00
2023-03-03 12:48:16 -08:00
2023-07-27 20:51:42 -07:00
2023-07-06 11:34:07 +01:00
2023-02-18 18:31:21 +02:00
2023-07-27 20:51:42 -07:00
2023-04-24 13:48:22 +01:00
2023-04-23 23:17:02 +02:00
2023-09-11 21:01:36 -07:00
2023-07-27 20:51:42 -07:00
2023-04-24 13:48:22 +01:00
2024-01-08 11:22:38 +01:00
2023-10-10 17:32:10 +02:00
2023-03-03 12:48:16 -08:00
2023-03-03 12:48:16 -08:00
2023-03-03 12:48:16 -08:00
2023-07-27 20:51:42 -07:00
2024-01-10 15:12:42 -08:00
2023-03-03 12:48:16 -08:00
2023-07-27 20:51:42 -07:00
2023-07-27 20:51:42 -07:00
2023-04-24 13:48:22 +01:00
2023-04-24 13:48:22 +01:00
2023-02-18 18:31:21 +02:00
2022-12-04 11:52:11 -08:00
2024-01-22 10:09:35 -08:00
2023-09-21 12:00:45 +02:00
2023-11-07 12:35:17 +01:00
2023-09-21 12:00:45 +02:00
2023-09-21 12:00:45 +02:00
2023-09-15 22:59:08 -07:00
2023-03-03 12:48:16 -08:00
2023-03-03 12:48:16 -08:00
2024-01-11 16:49:14 +00:00
2023-07-27 20:51:42 -07:00
2023-07-27 20:51:42 -07:00
2023-06-01 11:05:38 -07:00
2023-07-27 20:51:42 -07:00
2022-12-21 11:04:32 +00:00
2023-07-27 20:51:42 -07:00
2023-07-06 11:34:07 +01:00
2023-07-06 11:34:07 +01:00
2023-07-06 11:34:07 +01:00
2023-07-06 11:34:07 +01:00
2023-07-06 11:34:07 +01:00
2023-07-06 11:34:07 +01:00
2023-06-22 16:10:18 +01:00
2023-09-14 10:33:11 -07:00
2023-06-22 16:10:18 +01:00
2023-04-14 10:09:46 +01:00
2023-06-22 16:10:18 +01:00
2023-06-22 16:10:18 +01:00
2023-06-01 11:05:38 -07:00
2023-06-01 11:05:38 -07:00
2023-07-27 20:51:42 -07:00
2023-07-27 20:51:42 -07:00
2023-07-27 20:51:42 -07:00
2023-07-27 20:51:42 -07:00
2023-06-22 16:10:18 +01:00
2023-06-22 16:10:18 +01:00
2023-05-03 10:50:32 +01:00
2023-07-27 20:51:42 -07:00
2023-06-27 16:39:39 +01:00
2023-07-27 20:51:42 -07:00
2023-06-23 13:43:04 +01:00
2023-07-27 20:51:42 -07:00
2023-07-27 20:51:42 -07:00
2023-07-27 20:51:42 -07:00
2023-07-27 20:51:42 -07:00
2023-07-27 20:51:42 -07:00
2023-07-27 20:51:42 -07:00
2023-07-27 20:51:42 -07:00
2023-06-30 11:56:41 +01:00
2023-07-27 20:51:42 -07:00
2023-06-22 16:10:18 +01:00
2023-07-27 20:51:42 -07:00
2023-06-22 16:10:18 +01:00
2023-06-22 16:10:18 +01:00
2023-07-27 20:51:42 -07:00
2023-06-01 11:05:38 -07:00
2023-06-22 16:10:18 +01:00
2023-07-27 20:51:42 -07:00
2023-06-22 16:10:18 +01:00
2023-06-22 16:10:18 +01:00
2023-06-22 16:10:18 +01:00
2023-06-22 16:10:18 +01:00
2023-02-24 11:16:42 +08:00
2023-10-06 18:20:03 +08:00
2023-04-28 11:42:06 +08:00
2023-04-28 11:42:06 +08:00
2023-05-02 09:34:48 +08:00
2023-09-11 21:01:36 -07:00
2023-08-21 09:11:51 -07:00
2023-07-19 11:37:42 -07:00
2023-10-10 09:06:31 -07:00
2023-10-10 09:06:31 -07:00
2023-09-25 09:49:40 -07:00
2023-10-10 09:06:31 -07:00
2023-10-10 09:06:31 -07:00
2023-10-10 09:06:31 -07:00
2023-11-08 12:34:36 -08:00
2023-11-03 16:03:06 -07:00
2023-07-19 08:34:26 -07:00
2024-01-23 11:38:15 -08:00
2024-01-21 18:15:57 -08:00
2023-09-11 00:26:22 -07:00
2023-07-19 08:34:26 -07:00
2023-07-06 10:31:45 -07:00
2023-07-19 08:34:26 -07:00
2023-04-28 12:19:17 +02:00
2024-01-22 09:09:46 -08:00
2024-01-24 08:53:36 -08:00
2023-12-21 18:59:11 -08:00
2023-12-21 18:59:11 -08:00
2023-07-11 11:08:57 +00:00
2024-01-21 18:15:57 -08:00
2023-11-06 12:05:13 -08:00
2023-09-11 21:01:36 -07:00
2023-06-27 19:36:27 -07:00
2023-10-03 10:20:14 +01:00
2023-10-03 10:20:14 +01:00
2023-10-03 10:20:14 +01:00
2024-01-07 16:02:52 -08:00
2023-10-03 10:20:14 +01:00
2023-02-03 10:27:33 -08:00
2023-12-08 18:09:45 +05:30
2023-06-22 16:10:18 +01:00
2023-07-25 17:06:07 +08:00
2023-09-14 10:33:11 -07:00
2023-07-21 08:10:52 -04:00
2023-09-16 00:41:23 -07:00
2023-07-19 08:34:26 -07:00
2023-10-18 08:56:17 -07:00
2023-12-12 10:14:36 -08:00
2023-12-12 10:14:36 -08:00
2023-12-07 12:43:40 -08:00
2023-09-11 21:01:36 -07:00
2023-03-03 12:48:16 -08:00
2023-03-03 12:48:16 -08:00
2023-03-03 12:48:16 -08:00
2022-12-31 20:50:54 -08:00
2022-12-31 20:50:54 -08:00
2023-02-22 23:34:49 -08:00
2023-07-19 11:28:47 -07:00
2023-07-18 17:57:31 -07:00
2023-07-18 17:57:31 -07:00
2024-01-09 10:59:48 -08:00
2023-05-25 11:17:05 +02:00
2023-07-25 17:06:07 +08:00
2023-11-15 09:57:45 +08:00
2023-07-25 17:06:07 +08:00
2023-12-25 22:48:56 +08:00
2023-07-25 17:06:07 +08:00
2024-01-10 18:03:52 +08:00
2023-07-25 17:06:07 +08:00
2023-07-25 17:06:07 +08:00
2023-08-09 09:55:27 +08:00
2023-07-25 17:06:07 +08:00
2023-07-25 17:06:07 +08:00
2023-07-25 17:06:07 +08:00
2023-07-25 17:06:07 +08:00
2023-07-25 17:06:07 +08:00
2023-07-25 17:06:07 +08:00
2023-07-25 17:06:07 +08:00
2023-09-14 10:33:11 -07:00
2023-09-14 10:33:11 -07:00
2023-07-19 11:28:47 -07:00
2023-07-19 11:28:47 -07:00
2023-07-19 11:28:47 -07:00
2023-05-02 09:35:00 -07:00
2023-05-02 09:35:00 -07:00
2023-07-19 11:28:47 -07:00
2023-07-20 00:42:38 -07:00
2023-12-07 12:43:40 -08:00
2023-11-15 23:42:59 -08:00
2023-09-14 10:33:11 -07:00
2023-09-14 10:33:11 -07:00
2023-09-15 22:49:18 -07:00
2023-12-13 12:55:47 -06:00
2023-08-31 08:45:10 -05:00
2023-06-05 12:18:29 -04:00
2023-06-05 12:18:29 -04:00
2023-06-05 12:18:29 -04:00
2023-06-05 12:18:29 -04:00
2023-09-15 22:38:18 -07:00
2023-06-05 12:18:29 -04:00
2023-09-15 22:38:18 -07:00
2023-06-05 12:18:29 -04:00
2023-03-03 12:48:16 -08:00
2023-02-27 16:19:13 -08:00
2023-03-03 12:48:16 -08:00
2023-06-05 12:18:29 -04:00
2023-06-05 12:18:29 -04:00
2023-06-05 12:18:29 -04:00
2023-03-03 12:48:16 -08:00
2023-06-05 12:18:29 -04:00
2023-03-03 12:35:05 -08:00
2023-09-14 10:33:11 -07:00
2023-06-05 12:18:29 -04:00
2023-08-31 08:45:10 -05:00
2023-06-05 12:18:29 -04:00
2023-08-31 08:45:10 -05:00
2023-06-05 12:18:29 -04:00
2023-06-05 12:18:29 -04:00
2023-06-05 12:18:29 -04:00
2023-06-05 12:18:29 -04:00
2023-09-11 00:26:22 -07:00
2023-07-18 17:57:31 -07:00
2023-09-19 23:44:55 -07:00
2023-09-19 23:44:55 -07:00
2023-09-20 14:50:13 -07:00
2023-09-14 10:33:11 -07:00
2023-09-14 10:33:11 -07:00
2023-09-14 10:33:11 -07:00
2023-09-14 10:33:11 -07:00
2023-08-08 20:25:10 -07:00
2024-01-10 15:16:55 -08:00
2023-02-19 19:15:32 +00:00
2023-06-06 13:06:21 -07:00
2023-07-28 10:55:58 +02:00
2023-12-14 22:42:11 -08:00
2023-09-11 21:01:36 -07:00
2023-12-14 22:42:11 -08:00
2023-12-14 22:42:11 -08:00
2023-03-03 12:48:16 -08:00
2023-12-14 22:42:11 -08:00
2023-12-14 22:42:11 -08:00
2023-12-14 22:42:11 -08:00
2023-12-14 22:42:11 -08:00
2023-12-14 22:42:11 -08:00
2023-12-01 11:02:53 -08:00
2023-12-14 22:42:11 -08:00
2023-12-14 22:42:11 -08:00
2023-12-14 22:42:11 -08:00
2023-12-14 22:42:11 -08:00
2023-05-31 07:19:44 -07:00
2023-12-14 22:42:11 -08:00
2024-01-08 20:24:00 -08:00
2023-02-23 22:16:49 +00:00
2023-09-14 10:33:11 -07:00
2023-12-14 22:42:11 -08:00
2023-12-14 22:42:11 -08:00
2023-12-14 22:42:11 -08:00
2023-12-14 22:42:11 -08:00
2023-12-14 22:42:11 -08:00
2023-07-28 11:13:03 +02:00
2023-09-14 10:33:11 -07:00
2023-09-14 10:33:11 -07:00
2023-11-10 23:04:45 -08:00
2023-09-14 10:33:11 -07:00
2023-09-14 10:33:11 -07:00
2023-09-14 10:33:11 -07:00
2023-11-04 10:19:14 -07:00
2023-09-11 00:26:22 -07:00
2023-06-22 16:10:18 +01:00
2023-09-11 00:26:22 -07:00
2023-11-03 13:53:36 -07:00
2023-08-08 20:25:10 -07:00
2022-12-08 01:41:18 +00:00
2022-12-08 01:41:18 +00:00
2022-12-08 01:41:18 +00:00
2023-08-08 20:25:10 -07:00
2022-12-08 01:41:18 +00:00
2022-12-08 01:41:18 +00:00
2022-12-08 01:41:18 +00:00
2023-09-09 23:47:01 -07:00
2022-12-08 01:41:18 +00:00
2023-11-03 20:40:46 -07:00
2023-08-08 20:25:10 -07:00
2023-12-12 10:14:36 -08:00
2024-01-22 09:09:46 -08:00
2023-10-04 13:03:56 -07:00
2023-10-04 13:03:56 -07:00
2024-01-17 15:38:59 -08:00
2023-12-11 12:32:13 -08:00
2023-03-03 12:48:16 -08:00
2023-03-03 12:48:16 -08:00
2023-03-03 12:48:16 -08:00
2023-03-03 12:35:05 -08:00
2023-09-14 10:33:11 -07:00
2024-01-07 11:59:49 -08:00
2024-01-22 18:18:21 -08:00