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
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
2023-04-18 14:24:55 -04: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
2023-08-08 20:25:10 -07: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
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
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
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
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
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
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
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
2023-08-08 20:25:10 -07:00
2023-09-09 23:47:01 -07: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
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