History

recordmcount: x86: Assign a meaningful value to rel_type_nop

Although, the default value of rel_type_nop is zero, and the value of R_386_NONE/R_X86_64_NONE is zero too, but it should be assigned a meaningful value explicitly, otherwise it looks confused. Assign R_386_NONE to rel_type_nop for 386, assign R_X86_64_NONE to rel_type_nop for x86_64. Link: http://lkml.kernel.org/r/1446020606-16352-1-git-send-email-huawei.libin@huawei.com

Li Bin committed 11 years ago

Commit 46a2b611 parent 799fd441 file · +2 −0Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/recordmcount.c+2−0
@@ -345,6 +345,7 @@ do_file(char const *const fname) · 344 unmodified lines
345345 break;
346346 case EM_386:
347347 reltype = R_386_32;
348+ rel_type_nop = R_386_NONE;
348349 make_nop = make_nop_x86;
349350 ideal_nop = ideal_nop5_x86_32;
350351 mcount_adjust_32 = -1;
@@ -371,6 +372,7 @@ do_file(char const *const fname) · 20 unmodified lines
371372 make_nop = make_nop_x86;
372373 ideal_nop = ideal_nop5_x86_64;
373374 reltype = R_X86_64_64;
375+ rel_type_nop = R_X86_64_NONE;
374376 mcount_adjust_64 = -1;
375377 break;
376378 } /* end switch */