* [GOLD][PATCH][ARM] Better error reporting for the deprecated relocations
@ 2010-10-08 21:20 Viktor Kutuzov
2010-10-10 16:29 ` Doug Kwan (關振德)
2010-10-12 19:00 ` Ian Lance Taylor
0 siblings, 2 replies; 3+ messages in thread
From: Viktor Kutuzov @ 2010-10-08 21:20 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: Doug Kwan (關振德), binutils
[-- Attachment #1: Type: text/plain, Size: 564 bytes --]
This patch provides a better error reporting for the deprecated and/or
unsupported ARM relocations. Currently Gold reports an internal error on
that kind of relocations.
Such as
ld-new: error: arm_bl_in_range.o: unsupported reloc 1 against global
symbol _backward_target
instead of
ld-new: internal error in relocate, at ../../src/gold/arm.cc:9044
-Viktor
* arm.cc (Target_arm::Scan::local): Report the unsupported reloc
error for the deprecated relocations.
(Target_arm::Scan::global): Likewise.
(Target_arm::Relocate::relocate): Likewise.
[-- Attachment #2: binutils-gold-arm-error-unsup-reloc.patch --]
[-- Type: text/x-patch, Size: 2426 bytes --]
Index: gold/arm.cc
===================================================================
RCS file: /cvs/src/src/gold/arm.cc,v
retrieving revision 1.122
diff -u -r1.122 arm.cc
--- gold/arm.cc 17 Sep 2010 23:51:42 -0000 1.122
+++ gold/arm.cc 7 Oct 2010 18:12:01 -0000
@@ -7633,7 +7633,6 @@
}
break;
- case elfcpp::R_ARM_PC24:
case elfcpp::R_ARM_REL32:
case elfcpp::R_ARM_LDR_PC_G0:
case elfcpp::R_ARM_SBREL32:
@@ -7644,9 +7643,6 @@
case elfcpp::R_ARM_CALL:
case elfcpp::R_ARM_JUMP24:
case elfcpp::R_ARM_THM_JUMP24:
- case elfcpp::R_ARM_LDR_SBREL_11_0_NC:
- case elfcpp::R_ARM_ALU_SBREL_19_12_NC:
- case elfcpp::R_ARM_ALU_SBREL_27_20_CK:
case elfcpp::R_ARM_SBREL31:
case elfcpp::R_ARM_PREL31:
case elfcpp::R_ARM_MOVW_PREL_NC:
@@ -7850,6 +7846,10 @@
}
break;
+ case elfcpp::R_ARM_PC24:
+ case elfcpp::R_ARM_LDR_SBREL_11_0_NC:
+ case elfcpp::R_ARM_ALU_SBREL_19_12_NC:
+ case elfcpp::R_ARM_ALU_SBREL_27_20_CK:
default:
unsupported_reloc_local(object, r_type);
break;
@@ -8028,9 +8028,6 @@
case elfcpp::R_ARM_SBREL32:
case elfcpp::R_ARM_THM_PC8:
case elfcpp::R_ARM_BASE_PREL:
- case elfcpp::R_ARM_LDR_SBREL_11_0_NC:
- case elfcpp::R_ARM_ALU_SBREL_19_12_NC:
- case elfcpp::R_ARM_ALU_SBREL_27_20_CK:
case elfcpp::R_ARM_MOVW_PREL_NC:
case elfcpp::R_ARM_MOVT_PREL:
case elfcpp::R_ARM_THM_MOVW_PREL_NC:
@@ -8093,7 +8090,6 @@
}
break;
- case elfcpp::R_ARM_PC24:
case elfcpp::R_ARM_THM_CALL:
case elfcpp::R_ARM_PLT32:
case elfcpp::R_ARM_CALL:
@@ -8262,6 +8258,10 @@
}
break;
+ case elfcpp::R_ARM_PC24:
+ case elfcpp::R_ARM_LDR_SBREL_11_0_NC:
+ case elfcpp::R_ARM_ALU_SBREL_19_12_NC:
+ case elfcpp::R_ARM_ALU_SBREL_27_20_CK:
default:
unsupported_reloc_global(object, r_type, gsym);
break;
@@ -9040,8 +9040,15 @@
view, address, view_size);
break;
+ // The known and unknown unsupported and/or deprecated relocations.
+ case elfcpp::R_ARM_PC24:
+ case elfcpp::R_ARM_LDR_SBREL_11_0_NC:
+ case elfcpp::R_ARM_ALU_SBREL_19_12_NC:
+ case elfcpp::R_ARM_ALU_SBREL_27_20_CK:
default:
- gold_unreachable();
+ // Just silently leave the method. We should get an appropriate error
+ // message in the scan methods.
+ break;
}
// Report any errors.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [GOLD][PATCH][ARM] Better error reporting for the deprecated relocations
2010-10-08 21:20 [GOLD][PATCH][ARM] Better error reporting for the deprecated relocations Viktor Kutuzov
@ 2010-10-10 16:29 ` Doug Kwan (關振德)
2010-10-12 19:00 ` Ian Lance Taylor
1 sibling, 0 replies; 3+ messages in thread
From: Doug Kwan (關振德) @ 2010-10-10 16:29 UTC (permalink / raw)
To: vkutuzov; +Cc: Ian Lance Taylor, binutils
This is okay to me.
在 2010年10月9日上午5:19,Viktor Kutuzov <vkutuzov@accesssoftek.com> 寫道:
> This patch provides a better error reporting for the deprecated and/or
> unsupported ARM relocations. Currently Gold reports an internal error on
> that kind of relocations.
>
> Such as
>
> ld-new: error: arm_bl_in_range.o: unsupported reloc 1 against global
> symbol _backward_target
>
> instead of
>
> ld-new: internal error in relocate, at ../../src/gold/arm.cc:9044
>
>
> -Viktor
>
> * arm.cc (Target_arm::Scan::local): Report the unsupported reloc
> error for the deprecated relocations.
> (Target_arm::Scan::global): Likewise.
> (Target_arm::Relocate::relocate): Likewise.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [GOLD][PATCH][ARM] Better error reporting for the deprecated relocations
2010-10-08 21:20 [GOLD][PATCH][ARM] Better error reporting for the deprecated relocations Viktor Kutuzov
2010-10-10 16:29 ` Doug Kwan (關振德)
@ 2010-10-12 19:00 ` Ian Lance Taylor
1 sibling, 0 replies; 3+ messages in thread
From: Ian Lance Taylor @ 2010-10-12 19:00 UTC (permalink / raw)
To: vkutuzov; +Cc: Doug Kwan (關振德), binutils
Viktor Kutuzov <vkutuzov@accesssoftek.com> writes:
> * arm.cc (Target_arm::Scan::local): Report the unsupported reloc
> error for the deprecated relocations.
> (Target_arm::Scan::global): Likewise.
> (Target_arm::Relocate::relocate): Likewise.
Approved and applied.
Thanks.
Ian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-10-12 19:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-08 21:20 [GOLD][PATCH][ARM] Better error reporting for the deprecated relocations Viktor Kutuzov
2010-10-10 16:29 ` Doug Kwan (關振德)
2010-10-12 19:00 ` Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).