Fangrui Song
26ddf4eee2
[ELF] Change .debug_names tombstone value to UINT32_MAX/UINT64_MAX ( #74686 )
...
`clang -g -gpubnames -fdebug-types-section` now emits .debug_names
section with references to local type unit entries defined in COMDAT
.debug_info sections.
```
.section .debug_info,"G",@progbits,5657452045627120676,comdat
.Ltu_begin0:
...
.section .debug_names,"",@progbits
...
// DWARF32
.long .Ltu_begin0 # Type unit 0
// DWARF64
// .long .Ltu_begin0 # Type unit 0
```
When `.Ltu_begin0` is relative to a non-prevailing .debug_info section,
the relocation resolves to 0, which is a valid offset within the
.debug_info section.
```
cat > a.cc <<e
struct A { int x; };
inline A foo() { return {1}; }
int main() { foo(); }
e
cat > b.cc <<e
struct A { int x; };
inline A foo() { return {1}; }
void use() { foo(); }
e
clang++ -g -gpubnames -fdebug-types-section -fuse-ld=lld a.cc b.cc -o old
```
```
% llvm-dwarfdump old
...
Local Type Unit offsets [
LocalTU[0]: 0x00000000
]
...
Local Type Unit offsets [
LocalTU[0]: 0x00000000 // indistinguishable from a valid offset within .debug_info
]
```
https://dwarfstd.org/issues/231013.1.html proposes that we use a
tombstone value instead to inform consumers. This patch implements the
idea. The second LocalTU entry will now use 0xffffffff.
https://reviews.llvm.org/D84825 has a TODO that we should switch the
tombstone value for most `.debug_*` sections to UINT64_MAX. We have
postponed the change for more than three years for consumers to migrate.
At some point we shall make the change, so that .debug_names is no long
different from other debug section that is not .debug_loc/.debug_ranges.
Co-authored-by: Alexander Yermolovich <ayermolo@meta.com >
2023-12-21 18:59:11 -08:00
..
2023-08-18 22:51:25 +00:00
2023-11-10 22:40:57 -08:00
2023-12-16 13:12:17 -08:00
2023-11-30 19:02:25 +01: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
2023-07-31 17:07:42 +02: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
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
2023-11-03 11:05:09 -07: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
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
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
2022-07-26 09:35:30 +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
2019-09-16 07:05:34 +00: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
2020-03-04 12:22:12 -08:00
2023-05-02 09:34:48 +08:00
2020-07-31 11:50:55 -07:00
2020-07-31 11:50:55 -07:00
2020-07-31 11:50:55 -07:00
2019-05-01 05:49:01 +00:00
2019-09-16 07:04:16 +00:00
2020-03-04 12:22:12 -08:00
2023-09-11 21:01:36 -07:00
2021-09-20 09:35:12 -07:00
2020-03-04 12:22:12 -08:00
2022-11-07 18:28:33 +01: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
2017-07-20 18:17:55 +00:00
2022-10-21 09:43:25 -07:00
2022-03-15 19:24:41 -07:00
2022-09-12 12:56:35 -07:00
2021-05-22 17:48:45 -07:00
2023-07-19 08:34:26 -07:00
2023-04-18 14:24:55 -04:00
2023-09-11 00:26:22 -07:00
2019-09-16 07:05:34 +00:00
2020-02-19 22:01:42 -08:00
2023-07-19 08:34:26 -07:00
2022-05-27 12:08:24 +01:00
2023-07-06 10:31:45 -07:00
2019-10-10 23:35:53 +00:00
2023-07-19 08:34:26 -07:00
2023-04-28 12:19:17 +02:00
2020-02-05 10:25:04 -08:00
2022-09-09 10:25:37 -07:00
2022-09-09 10:18:46 -07:00
2021-02-12 21:00:42 -08:00
2021-02-12 21:00:42 -08:00
2021-10-31 13:12:26 -07:00
2018-07-02 17:48:23 +00:00
2021-11-29 14:14:53 -08:00
2023-08-08 20:25:10 -07:00
2023-12-21 18:59:11 -08:00
2023-12-21 18:59:11 -08:00
2017-09-30 21:28:49 +00:00
2020-02-12 21:54:50 -08:00
2020-02-12 21:54:50 -08:00
2020-03-06 13:59:58 +03:00
2020-03-27 11:56:02 -07:00
2017-11-22 22:00:50 +00:00
2020-08-03 16:59:13 -07:00
2023-07-11 11:08:57 +00:00
2018-08-04 11:33:38 +00:00
2022-09-20 17:05:36 -07:00
2023-11-06 12:05:13 -08:00
2020-06-10 14:06:30 +01:00
2017-09-08 18:53:43 +00:00
2023-09-11 21:01:36 -07:00
2019-09-06 15:10:31 +00: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
2023-10-03 10:20:14 +01:00
2020-02-19 22:01:42 -08:00
2023-02-03 10:27:33 -08:00
2022-03-29 09:51:41 -07:00
2020-05-15 11:07:25 -07:00
2019-05-01 06:02:16 +00: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
2020-03-04 10:48:36 -08:00
2021-09-20 09:35:12 -07:00
2020-11-09 13:28:48 +01:00
2020-11-03 11:01:29 +01:00
2022-02-27 20:47:37 +00:00
2022-03-15 19:24:41 -07:00
2019-05-22 09:06:42 +00:00
2019-05-01 05:49:01 +00:00
2020-03-15 17:48:36 -07:00
2020-04-02 01:21:36 +09:00
2019-03-12 11:10:29 +00:00
2022-01-06 00:43:46 -08:00
2020-05-15 11:07:25 -07:00
2023-07-21 08:10:52 -04:00
2023-09-16 00:41:23 -07:00
2019-05-01 05:49:01 +00:00
2019-12-10 09:00:58 -08:00
2021-02-12 21:00:42 -08:00
2023-07-19 08:34:26 -07:00
2023-10-18 08:56:17 -07:00
2019-09-16 07:05:34 +00:00
2018-07-02 17:48:23 +00:00
2021-02-12 21:00:42 -08:00
2021-02-12 21:00:42 -08:00
2021-02-13 10:32:27 -08:00
2022-10-29 15:40:26 -07:00
2020-08-25 08:05:39 -07:00
2019-05-01 05:49:01 +00:00
2023-12-12 10:14:36 -08:00
2023-12-12 10:14:36 -08:00
2022-10-29 15:40:26 -07:00
2018-05-31 20:46:22 +00:00
2020-02-12 21:54:50 -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
2023-02-22 23:34:49 -08:00
2018-07-02 17:48:23 +00: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
2021-10-25 14:01:36 -07:00
2020-03-15 17:48:36 -07:00
2020-01-21 10:05:26 +00:00
2020-01-21 10:05:26 +00:00
2021-02-08 10:34:57 -08:00
2020-05-04 14:25:25 +01: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-07-25 17:06:07 +08:00
2023-11-25 20:38:45 +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
2018-07-02 17:48:23 +00:00
2019-06-11 12:59:30 +00:00
2023-07-19 11:28:47 -07:00
2020-02-12 21:54:50 -08:00
2018-07-02 17:48:23 +00:00
2023-07-20 00:42:38 -07:00
2019-09-22 16:26:39 +00:00
2020-02-05 10:25:04 -08:00
2018-10-25 18:07:55 +00:00
2019-10-03 12:08:04 +00:00
2019-10-03 12:08:04 +00:00
2022-10-29 15:40:26 -07:00
2016-10-04 15:19:20 +00:00
2020-03-05 09:59:53 -08:00
2018-07-02 17:48:23 +00:00
2019-09-09 13:08:51 +00:00
2018-07-02 17:48:23 +00:00
2023-12-07 12:43:40 -08:00
2019-05-03 00:35:49 +00:00
2019-05-01 05:49:01 +00:00
2019-05-01 05:49:01 +00:00
2019-05-01 05:49:01 +00:00
2019-05-01 05:49:01 +00:00
2019-05-01 05:49:01 +00:00
2019-05-01 05:49:01 +00:00
2023-11-15 23:42:59 -08:00
2020-08-05 09:10:01 -07:00
2021-11-28 18:44:23 -08:00
2021-02-13 10:32:27 -08:00
2019-05-29 03:55:20 +00: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
2020-02-12 21:54:50 -08:00
2020-03-31 15:05:38 -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
2020-03-26 08:28:59 -07:00
2022-10-29 15:40:26 -07:00
2023-07-18 17:57:31 -07:00
2019-05-01 05:49:01 +00:00
2020-02-12 21:54:50 -08:00
2019-09-09 03:35:14 +00:00
2019-09-16 07:05:34 +00:00
2019-05-01 05:49:01 +00:00
2019-05-01 05:49:01 +00:00
2019-05-01 05:49:01 +00:00
2023-09-19 23:44:55 -07:00
2023-09-19 23:44:55 -07:00
2017-02-23 06:22:28 +00:00
2019-05-01 05:49:01 +00:00
2023-09-20 14:50:13 -07:00
2020-03-15 17:48:36 -07:00
2022-10-29 15:40:26 -07:00
2022-10-29 15:40:26 -07:00
2023-09-14 10:33:11 -07:00
2020-03-15 17:48:36 -07:00
2020-03-06 13:59:58 +03:00
2019-09-16 07:05:34 +00:00
2022-02-04 15:13:37 -08:00
2022-02-25 19:25:18 +00:00
2021-10-31 12:10:43 -07:00
2021-10-11 13:14:45 +01:00
2022-10-29 15:40:26 -07:00
2023-09-14 10:33:11 -07:00
2023-09-14 10:33:11 -07:00
2020-02-12 21:54:50 -08:00
2018-07-02 17:48:23 +00:00
2023-09-14 10:33:11 -07:00
2023-08-08 20:25:10 -07:00
2019-05-01 05:49:01 +00:00
2022-02-24 12:54:16 -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
2023-11-21 07:43:29 -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
2019-04-03 14:54:22 +00:00
2019-05-01 05:49:01 +00: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
2019-06-20 14:00:08 +00:00
2020-03-04 12:22:12 -08:00
2017-12-30 08:00:44 +00: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
2021-05-22 17:48:45 -07:00
2021-02-13 10:32:27 -08:00
2019-09-16 07:05:34 +00:00
2019-05-01 05:49:01 +00:00
2021-02-13 10:32:27 -08:00
2018-12-18 22:30:23 +00:00
2019-09-06 15:10:31 +00:00
2019-05-01 05:49:01 +00:00
2022-06-02 13:37:19 -07:00
2023-11-04 10:19:14 -07:00
2023-09-11 00:26:22 -07:00
2020-02-12 21:54:50 -08:00
2023-06-22 16:10:18 +01:00
2020-03-31 15:25:01 -07:00
2023-09-11 00:26:22 -07:00
2019-02-06 01:00:49 +00:00
2019-11-21 09:41:55 -08:00
2020-03-06 13:59:58 +03:00
2023-11-03 13:53:36 -07:00
2023-08-08 20:25:10 -07:00
2018-07-02 17:48:23 +00:00
2020-05-23 09:55:48 -07:00
2020-02-12 21:54:50 -08:00
2023-08-08 20:25:10 -07:00
2020-06-05 15:59:54 -07:00
2019-10-17 10:23:59 +00:00
2022-12-08 01:41:18 +00:00
2019-10-30 09:22:48 -07:00
2022-12-08 01:41:18 +00:00
2019-10-17 10:23:59 +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
2021-02-13 10:32:27 -08:00
2021-08-04 23:52:56 -07:00
2023-11-03 20:40:46 -07:00
2017-07-04 14:59:28 +00:00
2021-07-31 18:57:19 -07:00
2021-04-20 11:23:10 -07:00
2021-02-13 10:32:27 -08:00
2018-07-02 17:48:23 +00:00
2019-05-01 05:49:01 +00:00
2022-09-20 17:12:44 -07:00
2019-08-09 08:29:03 +00:00
2019-07-18 09:17:11 +00:00
2023-08-08 20:25:10 -07:00
2018-02-06 00:45:15 +00:00
2017-10-03 12:23:46 +00:00
2021-01-22 09:20:29 -08:00
2020-05-27 16:58:00 -07:00
2023-12-12 10:14:36 -08:00
2023-09-27 14:52:51 -07:00
2023-10-04 13:03:56 -07:00
2023-10-04 13:03:56 -07: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
2019-05-01 05:49:01 +00:00