diff options
| author | Will Deacon <will@kernel.org> | 2021-10-29 12:24:37 +0100 |
|---|---|---|
| committer | Will Deacon <will@kernel.org> | 2021-10-29 12:24:37 +0100 |
| commit | 99fe09c857c69be504ae43d6a417d21eafcc6cfb (patch) | |
| tree | 7d23269411a16c91e6f7344acd28ddd80729534e /scripts | |
| parent | a69483eeeffff016c8548c4388e23679be20f17f (diff) | |
| parent | bf6e667f47384585f737216ea1e928d987c3e6e2 (diff) | |
| download | cachepc-linux-99fe09c857c69be504ae43d6a417d21eafcc6cfb.tar.gz cachepc-linux-99fe09c857c69be504ae43d6a417d21eafcc6cfb.zip | |
Merge branch 'for-next/extable' into for-next/core
* for-next/extable:
arm64: vmlinux.lds.S: remove `.fixup` section
arm64: extable: add load_unaligned_zeropad() handler
arm64: extable: add a dedicated uaccess handler
arm64: extable: add `type` and `data` fields
arm64: extable: use `ex` for `exception_table_entry`
arm64: extable: make fixup_exception() return bool
arm64: extable: consolidate definitions
arm64: gpr-num: support W registers
arm64: factor out GPR numbering helpers
arm64: kvm: use kvm_exception_table_entry
arm64: lib: __arch_copy_to_user(): fold fixups into body
arm64: lib: __arch_copy_from_user(): fold fixups into body
arm64: lib: __arch_clear_user(): fold fixups into body
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/sorttable.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/scripts/sorttable.c b/scripts/sorttable.c index 6ee4fa882919..ee95bb47a50d 100644 --- a/scripts/sorttable.c +++ b/scripts/sorttable.c @@ -231,6 +231,34 @@ static void sort_relative_table(char *extab_image, int image_size) } } +static void arm64_sort_relative_table(char *extab_image, int image_size) +{ + int i = 0; + + while (i < image_size) { + uint32_t *loc = (uint32_t *)(extab_image + i); + + w(r(loc) + i, loc); + w(r(loc + 1) + i + 4, loc + 1); + /* Don't touch the fixup type or data */ + + i += sizeof(uint32_t) * 3; + } + + qsort(extab_image, image_size / 12, 12, compare_relative_table); + + i = 0; + while (i < image_size) { + uint32_t *loc = (uint32_t *)(extab_image + i); + + w(r(loc) - i, loc); + w(r(loc + 1) - (i + 4), loc + 1); + /* Don't touch the fixup type or data */ + + i += sizeof(uint32_t) * 3; + } +} + static void x86_sort_relative_table(char *extab_image, int image_size) { int i = 0; @@ -343,6 +371,8 @@ static int do_file(char const *const fname, void *addr) custom_sort = s390_sort_relative_table; break; case EM_AARCH64: + custom_sort = arm64_sort_relative_table; + break; case EM_PARISC: case EM_PPC: case EM_PPC64: |
