cb424d7448
verify-patch-sanity.py validates every active recipe .patch has internally- consistent hunk line counts — catching the 'malformed patch at line N' failure at commit/CI/preflight time instead of hours into a cook. This cycle hit that class three times (qtwaylandscanner, sddm, xwayland), each only discovered when cookbook tried to apply the patch. Running it across the repo found 29 latent malformed patches (validated against GNU patch: e.g. relibc/P3-sysv-ipc reproduces 'malformed patch at line 22'). They were harmless only because they sit in vendored recipes (baked, not re- applied) — but would fail on any version-bump re-derivation. --fix recounts the hunk headers (body untouched) and repaired all 29. Wired into build-preflight.sh (Phase 1.0D) and redbear-ci.yml, with a unit test (test-patch-sanity.sh). Skips archived/legacy trees and unvalidatable formats (empty placeholders, bare-@@ git hunks).
93 lines
2.1 KiB
ArmAsm
93 lines
2.1 KiB
ArmAsm
// REQUIRES: x86
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
|
|
// RUN: ld.lld %t -o %t.so -shared
|
|
// RUN: llvm-objdump -d --no-show-raw-insn %t.so | FileCheck --check-prefix=DISASM %s
|
|
// RUN: llvm-readobj --symbols -r %t.so | FileCheck -check-prefix=SYMBOL %s
|
|
|
|
// DISASM: <_start>:
|
|
// DISASM: 1330: callq 0x133f <__start_foo>
|
|
// DISASM: 1335: callq 0x1342 <__start_bar>
|
|
// DISASM: 133a: callq 0x1342 <__start_bar>
|
|
// DISASM: Disassembly of section foo:
|
|
// DISASM-EMPTY:
|
|
// DISASM: <__start_foo>:
|
|
// DISASM: 133f: nop
|
|
// DISASM: nop
|
|
// DISASM: nop
|
|
// DISASM: Disassembly of section bar:
|
|
// DISASM-EMPTY:
|
|
// DISASM: <__start_bar>:
|
|
// DISASM: 1342: nop
|
|
// DISASM: nop
|
|
// DISASM: nop
|
|
|
|
// SYMBOL: Relocations [
|
|
// SYMBOL-NEXT: Section ({{.*}}) .rela.dyn {
|
|
// SYMBOL-NEXT: R_X86_64_RELATIVE
|
|
// SYMBOL-NEXT: R_X86_64_RELATIVE
|
|
// SYMBOL-NEXT: R_X86_64_RELATIVE
|
|
// SYMBOL-NEXT: R_X86_64_RELATIVE
|
|
// SYMBOL-NEXT: }
|
|
// SYMBOL-NEXT: ]
|
|
|
|
// SYMBOL: Symbol {
|
|
// SYMBOL: Name: __start_foo
|
|
// SYMBOL: Value: 0x133F
|
|
// SYMBOL: STV_HIDDEN
|
|
// SYMBOL: Section: foo
|
|
// SYMBOL: }
|
|
// SYMBOL: Symbol {
|
|
// SYMBOL: Name: __stop_foo
|
|
// SYMBOL: Value: 0x1342
|
|
// SYMBOL: STV_HIDDEN
|
|
// SYMBOL: Section: foo
|
|
// SYMBOL: }
|
|
// SYMBOL: Symbol {
|
|
// SYMBOL: Name: __start_bar
|
|
// SYMBOL: Value: 0x1342
|
|
// SYMBOL: STV_HIDDEN
|
|
// SYMBOL: Section: bar
|
|
// SYMBOL: }
|
|
// SYMBOL-NOT: Section: __stop_bar
|
|
|
|
// SYMBOL: Symbol {
|
|
// SYMBOL: Name: __stop_zed2
|
|
// SYMBOL: Value: 0x3418
|
|
// SYMBOL: STV_PROTECTED
|
|
// SYMBOL: Section: zed2
|
|
// SYMBOL: }
|
|
// SYMBOL: Symbol {
|
|
// SYMBOL: Name: __stop_zed1
|
|
// SYMBOL: Value: 0x3408
|
|
// SYMBOL: STV_PROTECTED
|
|
// SYMBOL: Section: zed1
|
|
// SYMBOL: }
|
|
|
|
.hidden __start_foo
|
|
.hidden __stop_foo
|
|
.hidden __start_bar
|
|
.global _start
|
|
.text
|
|
_start:
|
|
call __start_foo
|
|
call __stop_foo
|
|
call __start_bar
|
|
|
|
.section foo,"ax"
|
|
nop
|
|
nop
|
|
nop
|
|
|
|
.section bar,"ax"
|
|
nop
|
|
nop
|
|
nop
|
|
|
|
.section zed1, "aw"
|
|
.quad __stop_zed2
|
|
.quad __stop_zed2 + 1
|
|
|
|
.section zed2, "aw"
|
|
.quad __stop_zed1
|
|
.quad __stop_zed1 + 1
|