File tree Expand file tree Collapse file tree 2 files changed +14
-16
lines changed Expand file tree Collapse file tree 2 files changed +14
-16
lines changed Original file line number Diff line number Diff line change @@ -1305,26 +1305,24 @@ __weak bool arch_is_rethunk(struct symbol *sym)
1305
1305
return false;
1306
1306
}
1307
1307
1308
- #define NEGATIVE_RELOC ((void *)-1L)
1309
-
1310
1308
static struct reloc * insn_reloc (struct objtool_file * file , struct instruction * insn )
1311
1309
{
1312
- if (insn -> reloc == NEGATIVE_RELOC )
1310
+ struct reloc * reloc ;
1311
+
1312
+ if (insn -> no_reloc )
1313
1313
return NULL ;
1314
1314
1315
- if (!insn -> reloc ) {
1316
- if (!file )
1317
- return NULL ;
1315
+ if (!file )
1316
+ return NULL ;
1318
1317
1319
- insn -> reloc = find_reloc_by_dest_range (file -> elf , insn -> sec ,
1320
- insn -> offset , insn -> len );
1321
- if (!insn -> reloc ) {
1322
- insn -> reloc = NEGATIVE_RELOC ;
1323
- return NULL ;
1324
- }
1318
+ reloc = find_reloc_by_dest_range (file -> elf , insn -> sec ,
1319
+ insn -> offset , insn -> len );
1320
+ if (!reloc ) {
1321
+ insn -> no_reloc = 1 ;
1322
+ return NULL ;
1325
1323
}
1326
1324
1327
- return insn -> reloc ;
1325
+ return reloc ;
1328
1326
}
1329
1327
1330
1328
static void remove_insn_ops (struct instruction * insn )
Original file line number Diff line number Diff line change @@ -55,8 +55,9 @@ struct instruction {
55
55
retpoline_safe : 1 ,
56
56
noendbr : 1 ,
57
57
entry : 1 ,
58
- visited : 4 ;
59
- /* 3 bit hole */
58
+ visited : 4 ,
59
+ no_reloc : 1 ;
60
+ /* 2 bit hole */
60
61
61
62
s8 instr ;
62
63
@@ -65,7 +66,6 @@ struct instruction {
65
66
struct instruction * jump_dest ;
66
67
struct instruction * first_jump_src ;
67
68
struct reloc * jump_table ;
68
- struct reloc * reloc ;
69
69
struct alternative * alts ;
70
70
struct symbol * sym ;
71
71
struct stack_op * stack_ops ;
You can’t perform that action at this time.
0 commit comments