diff options
author | Olaf Hering <olh@suse.de> | 2005-11-17 16:09:02 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-11-17 21:18:16 -0500 |
commit | 68643cfb879ad8c327441f875b60981822016575 (patch) | |
tree | 78c39f62bf48658640b4f4ed36a6356a4403cdd5 /arch/powerpc | |
parent | d2a33170972c5772826f7f6cc950ab69ba034667 (diff) |
[PATCH] ppc boot: replace string labels with numbers
Replacing the string labels with numbers saves 117 bytes in the final zImage.
These local labels are not discared.
Signed-off-by: Olaf Hering <olh@suse.de>
arch/powerpc/boot/crt0.S | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/boot/crt0.S | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/arch/powerpc/boot/crt0.S b/arch/powerpc/boot/crt0.S index 9cc442263939..d2f2ace56cd3 100644 --- a/arch/powerpc/boot/crt0.S +++ b/arch/powerpc/boot/crt0.S | |||
@@ -14,43 +14,42 @@ | |||
14 | .text | 14 | .text |
15 | .globl _zimage_start | 15 | .globl _zimage_start |
16 | _zimage_start: | 16 | _zimage_start: |
17 | bl reloc_offset | 17 | bl 1f |
18 | 18 | ||
19 | reloc_offset: | 19 | 1: |
20 | mflr r0 | 20 | mflr r0 |
21 | lis r9,reloc_offset@ha | 21 | lis r9,1b@ha |
22 | addi r9,r9,reloc_offset@l | 22 | addi r9,r9,1b@l |
23 | subf. r0,r9,r0 | 23 | subf. r0,r9,r0 |
24 | beq clear_caches | 24 | beq 3f |
25 | 25 | ||
26 | reloc_got2: | ||
27 | lis r9,__got2_start@ha | 26 | lis r9,__got2_start@ha |
28 | addi r9,r9,__got2_start@l | 27 | addi r9,r9,__got2_start@l |
29 | lis r8,__got2_end@ha | 28 | lis r8,__got2_end@ha |
30 | addi r8,r8,__got2_end@l | 29 | addi r8,r8,__got2_end@l |
31 | subf. r8,r9,r8 | 30 | subf. r8,r9,r8 |
32 | beq clear_caches | 31 | beq 3f |
33 | srwi. r8,r8,2 | 32 | srwi. r8,r8,2 |
34 | mtctr r8 | 33 | mtctr r8 |
35 | add r9,r0,r9 | 34 | add r9,r0,r9 |
36 | reloc_got2_loop: | 35 | 2: |
37 | lwz r8,0(r9) | 36 | lwz r8,0(r9) |
38 | add r8,r8,r0 | 37 | add r8,r8,r0 |
39 | stw r8,0(r9) | 38 | stw r8,0(r9) |
40 | addi r9,r9,4 | 39 | addi r9,r9,4 |
41 | bdnz reloc_got2_loop | 40 | bdnz 2b |
42 | 41 | ||
43 | clear_caches: | 42 | 3: |
44 | lis r9,_start@h | 43 | lis r9,_start@h |
45 | add r9,r0,r9 | 44 | add r9,r0,r9 |
46 | lis r8,_etext@ha | 45 | lis r8,_etext@ha |
47 | addi r8,r8,_etext@l | 46 | addi r8,r8,_etext@l |
48 | add r8,r0,r8 | 47 | add r8,r0,r8 |
49 | 1: dcbf r0,r9 | 48 | 4: dcbf r0,r9 |
50 | icbi r0,r9 | 49 | icbi r0,r9 |
51 | addi r9,r9,0x20 | 50 | addi r9,r9,0x20 |
52 | cmplwi 0,r9,8 | 51 | cmplwi 0,r9,8 |
53 | blt 1b | 52 | blt 4b |
54 | sync | 53 | sync |
55 | isync | 54 | isync |
56 | 55 | ||