Skip to content

Commit f5983da

Browse files
committed
modpost: define more R_ARM_* for old distributions
On CentOS 7, the following build error occurs. scripts/mod/modpost.c: In function 'addend_arm_rel': scripts/mod/modpost.c:1312:7: error: 'R_ARM_MOVW_ABS_NC' undeclared (first use in this function); did you mean 'R_ARM_THM_ABS5'? case R_ARM_MOVW_ABS_NC: ^~~~~~~~~~~~~~~~~ R_ARM_THM_ABS5 scripts/mod/modpost.c:1312:7: note: each undeclared identifier is reported only once for each function it appears in scripts/mod/modpost.c:1313:7: error: 'R_ARM_MOVT_ABS' undeclared (first use in this function); did you mean 'R_ARM_THM_ABS5'? case R_ARM_MOVT_ABS: ^~~~~~~~~~~~~~ R_ARM_THM_ABS5 scripts/mod/modpost.c:1326:7: error: 'R_ARM_THM_MOVW_ABS_NC' undeclared (first use in this function); did you mean 'R_ARM_THM_ABS5'? case R_ARM_THM_MOVW_ABS_NC: ^~~~~~~~~~~~~~~~~~~~~ R_ARM_THM_ABS5 scripts/mod/modpost.c:1327:7: error: 'R_ARM_THM_MOVT_ABS' undeclared (first use in this function); did you mean 'R_ARM_THM_ABS5'? case R_ARM_THM_MOVT_ABS: ^~~~~~~~~~~~~~~~~~ R_ARM_THM_ABS5 Fixes: 12ca2c6 ("modpost: detect section mismatch for R_ARM_{MOVW_ABS_NC,MOVT_ABS}") Fixes: cd1824f ("modpost: detect section mismatch for R_ARM_THM_{MOVW_ABS_NC,MOVT_ABS}") Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
1 parent 5fc10e7 commit f5983da

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

scripts/mod/modpost.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,6 +1286,23 @@ static int addend_386_rel(uint32_t *location, Elf_Rela *r)
12861286
#ifndef R_ARM_THM_JUMP24
12871287
#define R_ARM_THM_JUMP24 30
12881288
#endif
1289+
1290+
#ifndef R_ARM_MOVW_ABS_NC
1291+
#define R_ARM_MOVW_ABS_NC 43
1292+
#endif
1293+
1294+
#ifndef R_ARM_MOVT_ABS
1295+
#define R_ARM_MOVT_ABS 44
1296+
#endif
1297+
1298+
#ifndef R_ARM_THM_MOVW_ABS_NC
1299+
#define R_ARM_THM_MOVW_ABS_NC 47
1300+
#endif
1301+
1302+
#ifndef R_ARM_THM_MOVT_ABS
1303+
#define R_ARM_THM_MOVT_ABS 48
1304+
#endif
1305+
12891306
#ifndef R_ARM_THM_JUMP19
12901307
#define R_ARM_THM_JUMP19 51
12911308
#endif

0 commit comments

Comments
 (0)