Merge pull request #892 from kamalesh-babulal/addr_align

create-diff-object: Relax sh_addralign check for .text sections
This commit is contained in:
Joe Lawrence 2018-07-11 14:31:47 -04:00 committed by GitHub
commit cd352cf8a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -375,8 +375,9 @@ static void kpatch_compare_correlated_section(struct section *sec)
/* Compare section headers (must match or fatal) */
if (sec1->sh.sh_type != sec2->sh.sh_type ||
sec1->sh.sh_flags != sec2->sh.sh_flags ||
sec1->sh.sh_addralign != sec2->sh.sh_addralign ||
sec1->sh.sh_entsize != sec2->sh.sh_entsize)
sec1->sh.sh_entsize != sec2->sh.sh_entsize ||
(sec1->sh.sh_addralign != sec2->sh.sh_addralign &&
!is_text_section(sec1)))
DIFF_FATAL("%s section header details differ", sec1->name);
/* Short circuit for mcount sections, we rebuild regardless */