/* Generated by compiling with any LLVM version and
** with any GNU Arm Embedded Toolchain version.
** LLVM 3.8.0/5.0.0 and GNU Arm Embedded Toolchain 2.26 is fine.
**
** clang -O0 --target=arm-none-eabi -emit-llvm -c simple.c -o simple.bc
** llc -O0 -march=arm -filetype=obj simple.bc -o reloc_simple_arm_llvm.o
** arm-none-eabi-ld -e main reloc_simple_arm_llvm.o -o simple_arm_llvm.elf
**
** reloc_simple_arm_llvm.o is ELF file that needs call relocation.
**
** simple_arm_llvm.elf is a relocated ELF file.
*/

int add(int a, int b) {
    return a + b;
}

int sub(int a, int b) {
    return a - b;
}

int mul(int a, int b) {
    return a * b;
}

void triple(int a, int b) {
    add(a, b);
    sub(a, b);
    mul(a, b);
}

int main(void) {
    int a = 0xABCD, b = 0x1234;

    add(a, b);
    sub(a, b);
    mul(a, b);
    triple(a, b);

    return 0;
}
