[Fire TV General] freezer2k:
Okay, I set up the latest Android NDK on Ubuntu 14.04 and made the changes suggested by you, g4rb4g3!

Interestingly enough, the resulting bytesize is different from yours, i used the howto from here:

http://stackoverflow.com/questions/6745064/how-to-run-arm-binary-on-android-platform

And then:

$CC -c ./ion.c -o ./ion.o

$CC -c ./kgsl.c -o kgsl.o

$CC -c ./kilroy.c -o kilroy.o

$CC -o ./kilroy ./ion.o ./kgsl.o kilroy.o

Some interesting output:

<2>[51518.474853] kgsl kgsl-3d0: |a3xx_err_callback| CP | Protected mode error| WRITE | addr=1ec

<3>[51518.628448] kgsl kgsl-3d0: |adreno_ft_detect| Proc kilroy2, ctxt_id 4 ts 1 triggered fault tolerance on global ts 1225504

<3>[51518.628601] kgsl kgsl-3d0: RBBM STATUS 80004001 | IB1:10009000/00000000 | IB2: C000B000/00000033 | RPTR: 1D20 | WPTR: 1EB6

<3>[51518.629791] kgsl kgsl-3d0: |push_object| snapshot: Can't find GPU address for 10009000

<3>[51518.629882] kgsl kgsl-3d0: |kgsl_snapshot_get_object| Unable to find GPU buffer C000B500

<3>[51518.639801] kgsl kgsl-3d0: |kgsl_device_snapshot| snapshot created at pa adf00000 size 136036

<3>[51518.639984] kgsl kgsl-3d0: |kgsl_iommu_clk_disable_event| IOMMU disable clock event being cancelled, iommu_last_cmd_ts: 12b322, retired ts: 12b31f

<2>[51518.646911] kgsl kgsl-3d0: |a3xx_err_callback| CP | Protected mode error| WRITE | addr=1ec

<3>[51518.807830] kgsl kgsl-3d0: |adreno_ft_detect| Proc kilroy2, ctxt_id 4 ts 1 triggered fault tolerance on global ts 1225504

<3>[51518.807983] kgsl kgsl-3d0: |adreno_idle| spun too long waiting for RB to idle

<3>[51518.807983] kgsl kgsl-3d0: |_adreno_ft| Replay unsuccessful

<3>[51518.828369] kgsl kgsl-3d0: |adreno_ft| policy 0x6 status 0x0

<3>[51550.911590] init: untracked pid 29017 exited

shell@android:/data/local/tmp $ ./kilroy2

main:362: ttbr0=a000006a

add_large_mapping:232: pa=a0000000, va=10000000, len=1000000, cached=0

add_large_mapping:232: pa=81000000, va=81000000, len=1000000, cached=1

add_small_mapping:271: pa=07c00000, va=c000c000, len=1000, cached=0

add_small_mapping:271: pa=07d00000, va=c010c000, len=1000, cached=0

add_small_mapping:271: pa=a0008000, va=c000b000, len=1000, cached=0

main:403: cs[0]: 10008000/c000b000 (115 dwords) (limit: c000b1cc)

main:444: buf: 0x40515000 / 10000000

main:448: ibaddrs[0]: 0x4051e000 / 10009000 (152 dwords)

00000000: c0733d00 c000b000 000001ec 00000020 c0002600 00000000 c0001300 00000000

00000020: c0013d00 c000b500 000000a0 c0002600 00000000 c0043c00 00000013 c000b500

00000040: 000000a0 ffffffff ffffffff c0023d00 c000c010 a000006a a000006a c0013d00

00000060: c000b500 000000a7 c0002600 00000000 c0043c00 00000013 c000b500 000000a7

00000080: ffffffff ffffffff c0023d00 c010c010 a000006a a000006a c0013d00 c000b500

000000A0: 000000ae c0002600 00000000 c0043c00 00000013 c000b500 000000ae ffffffff

000000C0: ffffffff c0013d00 c000c000 00000003 c0002600 00000000 c0043c00 00000013

000000E0: c000c000 00000003 ffffffff ffffffff c0013d00 c010c000 00000003 c0002600

00000100: 00000000 c0043c00 00000013 c010c000 00000003 ffffffff ffffffff c0013d00

00000120: c000c800 00000001 c0002600 00000000 c0013d00 c010c800 00000001 c0002600

00000140: 00000000 c0013d00 c000b500 000000b9 c0002600 00000000 c0043c00 00000013

00000160: c000b500 000000b9 ffffffff ffffffff c0002600 00000000 c0001300 00000000

00000180: 000001ec 00000000 c0002600 00000000 c0001300 00000000 c0013d00 c000b500

000001A0: 000000cb c0002600 00000000 c0043c00 00000013 c000b500 000000cb ffffffff

000001C0: ffffffff c0002600 00000000 c0001300 00000000 c0002600 00000000 c0013700

000001E0: c000b000 00000073 c0002600 00000000 c0013700 c000b000 00000073 c0002600

00000200: 00000000 c0002600 00000000 c0004600 00000006 c0043d00 813ac000 726c694b

00000220: 7720796f 68207361 00657265 c0002600 00000000 c0013d00 c000b500 cafebabe

00000240: c0002600 00000000 c0043c00 00000013 c000b500 deadbeef ffffffff ffffffff

shell@android:/data/local/tmp $

It does not crash my box anymore. Not sure if this was compiled correctly, as i only took the 3 header files from the Amazon package and the rest is from the NDK.

[MENTION=1912014]g4rb4g3[/MENTION]

Could you try to run this binary on your box as well, as I'm running a different kernel/firmware, that does not match exactly https://kindle-src.s3.amazonaws.com/firetv_src_51.1.3.0_user_513011820.tar.bz2.

Wonder if that could also be related to changing DSYNC to SYNC in kilroy.c?