scripts/sorttable: Unify arm64 & x86 sort functions

The format of the arm64 and x86 exception table entries is essentially
the same as of commits:

  46d28947d9876fc0 ("x86/extable: Rework the exception table mechanics")
  d6e2cc5647753825 ("arm64: extable: add `type` and `data` fields")

Both use a 12-byte entry consisting of two 32-bit relative offsets and
32 bits of (absolute) data, and their sort functions are identical aside
from commentary, with arm64 saying:

   /* Don't touch the fixup type or data */

... and x86 saying:

  /* Don't touch the fixup type */

Unify the two behind a common sort_relative_table_with_data() function,
retaining the arm64 commentary.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Will Deacon <will@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Borislav Petkov <bp@suse.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
1 file changed