OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "native_client/src/trusted/service_runtime/nacl_config.h" | 44 #include "native_client/src/trusted/service_runtime/nacl_config.h" |
45 | 45 |
46 /* TODO(robertm): this should really be sizeof(nc_thread_descriptor_t) */ | 46 /* TODO(robertm): this should really be sizeof(nc_thread_descriptor_t) */ |
47 .set TDB_SIZE, 128 | 47 .set TDB_SIZE, 128 |
48 /* ====================================================================== */ | 48 /* ====================================================================== */ |
49 /* BEGIN .init section */ | 49 /* BEGIN .init section */ |
50 /* ====================================================================== */ | 50 /* ====================================================================== */ |
51 | 51 |
52 | 52 |
53 .section .init | 53 .section .init |
54 .align NACL_ARM_BUNDLE_SIZE_LOG | 54 .align NACL_BLOCK_SHIFT |
55 .global _init | 55 .global _init |
56 _init: | 56 _init: |
57 /* TODO(robertm): check whether r4 needs to be saved */ | 57 /* TODO(robertm): check whether r4 needs to be saved */ |
58 push {r4, lr} | 58 push {r4, lr} |
59 /* | 59 /* |
60 * The code that follows will be appended by the linker, and will not | 60 * The code that follows will be appended by the linker, and will not |
61 * be aligned individually, so we need to align it. | 61 * be aligned individually, so we need to align it. |
62 */ | 62 */ |
63 .align NACL_ARM_BUNDLE_SIZE_LOG | 63 .align NACL_BLOCK_SHIFT |
64 | 64 |
65 /* | 65 /* |
66 * contained in crtn_arm.S (properly sandboxed, of course) | 66 * contained in crtn_arm.S (properly sandboxed, of course) |
67 * | 67 * |
68 * pop {r4, pc} | 68 * pop {r4, pc} |
69 */ | 69 */ |
70 | 70 |
71 /* ====================================================================== */ | 71 /* ====================================================================== */ |
72 /* BEGIN .fini section */ | 72 /* BEGIN .fini section */ |
73 /* ====================================================================== */ | 73 /* ====================================================================== */ |
74 .section .fini | 74 .section .fini |
75 .align NACL_ARM_BUNDLE_SIZE_LOG | 75 .align NACL_BLOCK_SHIFT |
76 .global _fini | 76 .global _fini |
77 _fini: | 77 _fini: |
78 /* c.f. init section comment */ | 78 /* c.f. init section comment */ |
79 push {r4, lr} | 79 push {r4, lr} |
80 .align NACL_ARM_BUNDLE_SIZE_LOG | 80 .align NACL_BLOCK_SHIFT |
81 | 81 |
82 | 82 |
83 /* ====================================================================== */ | 83 /* ====================================================================== */ |
84 /* BEGIN .tdata section */ | 84 /* BEGIN .tdata section */ |
85 /* ====================================================================== */ | 85 /* ====================================================================== */ |
86 /* ensure we have space for a tdb at the very beginning of the tls area */ | 86 /* ensure we have space for a tdb at the very beginning of the tls area */ |
87 /* NOTE: this is different from x86 where we put the tdb at the end */ | 87 /* NOTE: this is different from x86 where we put the tdb at the end */ |
88 /* See tls.c for details. */ | 88 /* See tls.c for details. */ |
89 .section .tdata | 89 .section .tdata |
90 .global __tdb | 90 .global __tdb |
91 __tdb: | 91 __tdb: |
92 .fill TDB_SIZE, 1, -1 | 92 .fill TDB_SIZE, 1, -1 |
OLD | NEW |