@@ -539,8 +539,9 @@ fn reportTextRelocError(
539
539
) RelocError ! void {
540
540
const diags = & elf_file .base .comp .link_diags ;
541
541
var err = try diags .addErrorWithNotes (1 );
542
- try err .addMsg ("relocation at offset 0x{x} against symbol '{s}' cannot be used" , .{
542
+ try err .addMsg ("relocation at offset 0x{x} with type {} against symbol '{s}' cannot be used" , .{
543
543
rel .r_offset ,
544
+ relocation .fmtRelocType (rel .r_type (), elf_file .getTarget ().cpu .arch ),
544
545
symbol .name (elf_file ),
545
546
});
546
547
err .addNote ("in {}:{s}" , .{ self .file (elf_file ).? .fmtPath (), self .name (elf_file ) });
@@ -555,8 +556,9 @@ fn reportPicError(
555
556
) RelocError ! void {
556
557
const diags = & elf_file .base .comp .link_diags ;
557
558
var err = try diags .addErrorWithNotes (2 );
558
- try err .addMsg ("relocation at offset 0x{x} against symbol '{s}' cannot be used" , .{
559
+ try err .addMsg ("relocation at offset 0x{x} with type {} against symbol '{s}' cannot be used" , .{
559
560
rel .r_offset ,
561
+ relocation .fmtRelocType (rel .r_type (), elf_file .getTarget ().cpu .arch ),
560
562
symbol .name (elf_file ),
561
563
});
562
564
err .addNote ("in {}:{s}" , .{ self .file (elf_file ).? .fmtPath (), self .name (elf_file ) });
@@ -572,8 +574,9 @@ fn reportNoPicError(
572
574
) RelocError ! void {
573
575
const diags = & elf_file .base .comp .link_diags ;
574
576
var err = try diags .addErrorWithNotes (2 );
575
- try err .addMsg ("relocation at offset 0x{x} against symbol '{s}' cannot be used" , .{
577
+ try err .addMsg ("relocation at offset 0x{x} with type {} against symbol '{s}' cannot be used" , .{
576
578
rel .r_offset ,
579
+ relocation .fmtRelocType (rel .r_type (), elf_file .getTarget ().cpu .arch ),
577
580
symbol .name (elf_file ),
578
581
});
579
582
err .addNote ("in {}:{s}" , .{ self .file (elf_file ).? .fmtPath (), self .name (elf_file ) });
0 commit comments