File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -564,6 +564,10 @@ func (f *File) applyRelocationsAMD64(dst []byte, rels []byte) error {
564
564
continue
565
565
}
566
566
567
+ // There are relocations, so this must be a normal
568
+ // object file, and we only look at section symbols,
569
+ // so we assume that the symbol value is 0.
570
+
567
571
switch t {
568
572
case R_X86_64_64 :
569
573
if rela .Off + 8 >= uint64 (len (dst )) || rela .Addend < 0 {
@@ -646,6 +650,10 @@ func (f *File) applyRelocationsARM64(dst []byte, rels []byte) error {
646
650
continue
647
651
}
648
652
653
+ // There are relocations, so this must be a normal
654
+ // object file, and we only look at section symbols,
655
+ // so we assume that the symbol value is 0.
656
+
649
657
switch t {
650
658
case R_AARCH64_ABS64 :
651
659
if rela .Off + 8 >= uint64 (len (dst )) || rela .Addend < 0 {
You can’t perform that action at this time.
0 commit comments