diff --git a/README.adoc b/README.adoc index c65d095..ae8b3e8 100644 --- a/README.adoc +++ b/README.adoc @@ -12678,6 +12678,15 @@ gdb-multiarch -batch -ex 'arch arm' -ex "file v7/nop.out" -ex "disassemble/rs as Bibliography: https://stackoverflow.com/questions/1875491/nop-for-iphone-binaries +==== ARM udf instruction + +Guaranteed undefined! Therefore raise illegal instruction signal. Used by GCC `__builtin_trap` apparently: https://stackoverflow.com/questions/16081618/programmatically-cause-undefined-instruction-exception + +* link:userland/arch/arm/udf.S[] +* link:userland/arch/aarch64/udf.S[] + +TODO: why GNU GAS 2.29 does not have a mnemonic for it? + === ARM SIMD ==== ARM VFP diff --git a/path_properties.py b/path_properties.py index 767aacb..703a825 100644 --- a/path_properties.py +++ b/path_properties.py @@ -313,6 +313,10 @@ path_properties_tuples = ( }, ), 'freestanding': freestanding_properties, + 'udf.S': { + 'exit_status': 132, + 'receives_signal': True + }, } ), 'aarch64': ( @@ -327,6 +331,10 @@ path_properties_tuples = ( }, ), 'freestanding': freestanding_properties, + 'udf.S': { + 'exit_status': 132, + 'receives_signal': True + }, } ), 'fail.S': {'exit_status': 1}, diff --git a/userland/arch/aarch64/udf.S b/userland/arch/aarch64/udf.S new file mode 100644 index 0000000..b249424 --- /dev/null +++ b/userland/arch/aarch64/udf.S @@ -0,0 +1,10 @@ +/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-udf-instruction */ + +#include "common.h" + +ENTRY + .long 0 +#if 0 + udf 0 +#endif +EXIT diff --git a/userland/arch/arm/udf.S b/userland/arch/arm/udf.S new file mode 100644 index 0000000..a8f5cca --- /dev/null +++ b/userland/arch/arm/udf.S @@ -0,0 +1,7 @@ +/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-udf-instruction */ + +#include "common.h" + +ENTRY + udf 0 +EXIT