commit d5c7cfe06d456bb39988dacd4b24f1d394385f2c
parent 58763c43b111e6d23e56bc63bdb6100789eb240a
Author: Ryan Sepassi <rsepassi@gmail.com>
Date: Wed, 10 Jun 2026 09:26:22 -0700
reloc desc test: add missing RV_ALIGN
Diffstat:
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/test/link/reloc_desc_test.c b/test/link/reloc_desc_test.c
@@ -35,7 +35,8 @@ static KitUnit g_u;
#define ORACLE_RV_ULEB128_NOMINAL_WIDTH 1u
-/* Verbatim snapshot of the former reloc_width() (arch-independent). */
+/* Verbatim snapshot of the former reloc_width() (arch-independent), with one
+ * deliberate post-freeze addition: R_RV_ALIGN's marker row (see its case). */
static u8 oracle_width(RelocKind k) {
switch (k) {
case R_ABS32:
@@ -110,6 +111,13 @@ static u8 oracle_width(RelocKind k) {
return 2;
case R_RV_RELAX:
case R_RV_TPREL_ADD:
+ /* R_RV_ALIGN gained a marker descriptor row post-freeze (cleanup wave D,
+ * D.2, commit c0b3c960): link_emit_relocations now drops all three RISC-V
+ * relaxation markers via the RELOC_MARKER descriptor flag instead of a
+ * hardcoded name list, so ALIGN needs a row to be recognized. Its width is
+ * the conventional unused gate value (4) shared by its sibling markers; it
+ * is never read, since markers are skipped before the width gate. */
+ case R_RV_ALIGN:
return 4;
case R_ADD8:
case R_SUB8: