--- yaboot-1.3.17.redhat/second/crt0.S 2011-10-18 00:11:10.000000000 -0400 +++ yaboot-1.3.17/second/crt0.S 2014-03-07 00:34:34.209999068 -0500 @@ -1,6 +1,8 @@ #include "asm/ppc_asm.tmpl" #include "asm/processor.h" +canary: .long 0 + /* * Main entry point. We zero the BSS then jump to yaboot_start. */ @@ -15,6 +17,14 @@ 1: stwu r0,4(r10) cmp 0,r10,r11 bne 1b + + /* r2 should contain the location of the TLS TCB + 0x7000 + * according to the ABI. We don't setup a proper TLS area + * as libext2fs doesn't require it. However it is used for + * the stack canary when using -fstack-protector so we + * setup r2 to point to a storage location for the canary. */ + lis r2,(canary+0x7008)@h + ori r2,r2,(canary+0x7008)@l b yaboot_start /*