comparison gcc/crtstuff.c @ 63:b7f97abdc517 gcc-4.6-20100522

update gcc from gcc-4.5.0 to gcc-4.6
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Mon, 24 May 2010 12:47:05 +0900
parents 77e2b8dfacca
children f6334be47118
comparison
equal deleted inserted replaced
56:3c8a44c06a95 63:b7f97abdc517
185 #ifdef CTOR_LIST_BEGIN 185 #ifdef CTOR_LIST_BEGIN
186 CTOR_LIST_BEGIN; 186 CTOR_LIST_BEGIN;
187 #elif defined(CTORS_SECTION_ASM_OP) 187 #elif defined(CTORS_SECTION_ASM_OP)
188 /* Hack: force cc1 to switch to .data section early, so that assembling 188 /* Hack: force cc1 to switch to .data section early, so that assembling
189 __CTOR_LIST__ does not undo our behind-the-back change to .ctors. */ 189 __CTOR_LIST__ does not undo our behind-the-back change to .ctors. */
190 static func_ptr force_to_data[1] __attribute__ ((__unused__)) = { }; 190 static func_ptr force_to_data[1] __attribute__ ((__used__)) = { };
191 asm (CTORS_SECTION_ASM_OP); 191 asm (CTORS_SECTION_ASM_OP);
192 STATIC func_ptr __CTOR_LIST__[1] 192 STATIC func_ptr __CTOR_LIST__[1]
193 __attribute__ ((__unused__, aligned(sizeof(func_ptr)))) 193 __attribute__ ((__used__, aligned(sizeof(func_ptr))))
194 = { (func_ptr) (-1) }; 194 = { (func_ptr) (-1) };
195 #else 195 #else
196 STATIC func_ptr __CTOR_LIST__[1] 196 STATIC func_ptr __CTOR_LIST__[1]
197 __attribute__ ((__unused__, section(".ctors"), aligned(sizeof(func_ptr)))) 197 __attribute__ ((__used__, section(".ctors"), aligned(sizeof(func_ptr))))
198 = { (func_ptr) (-1) }; 198 = { (func_ptr) (-1) };
199 #endif /* __CTOR_LIST__ alternatives */ 199 #endif /* __CTOR_LIST__ alternatives */
200 200
201 #ifdef DTOR_LIST_BEGIN 201 #ifdef DTOR_LIST_BEGIN
202 DTOR_LIST_BEGIN; 202 DTOR_LIST_BEGIN;
221 221
222 #ifdef JCR_SECTION_NAME 222 #ifdef JCR_SECTION_NAME
223 /* Stick a label at the beginning of the java class registration info 223 /* Stick a label at the beginning of the java class registration info
224 so we can register them properly. */ 224 so we can register them properly. */
225 STATIC void *__JCR_LIST__[] 225 STATIC void *__JCR_LIST__[]
226 __attribute__ ((unused, section(JCR_SECTION_NAME), aligned(sizeof(void*)))) 226 __attribute__ ((used, section(JCR_SECTION_NAME), aligned(sizeof(void*))))
227 = { }; 227 = { };
228 #endif /* JCR_SECTION_NAME */ 228 #endif /* JCR_SECTION_NAME */
229 229
230 #if defined(INIT_SECTION_ASM_OP) || defined(INIT_ARRAY_SECTION_ASM_OP) 230 #if defined(INIT_SECTION_ASM_OP) || defined(INIT_ARRAY_SECTION_ASM_OP)
231 231
334 /* Stick a call to __do_global_dtors_aux into the .fini section. */ 334 /* Stick a call to __do_global_dtors_aux into the .fini section. */
335 #ifdef FINI_SECTION_ASM_OP 335 #ifdef FINI_SECTION_ASM_OP
336 CRT_CALL_STATIC_FUNCTION (FINI_SECTION_ASM_OP, __do_global_dtors_aux) 336 CRT_CALL_STATIC_FUNCTION (FINI_SECTION_ASM_OP, __do_global_dtors_aux)
337 #elif defined (FINI_ARRAY_SECTION_ASM_OP) 337 #elif defined (FINI_ARRAY_SECTION_ASM_OP)
338 static func_ptr __do_global_dtors_aux_fini_array_entry[] 338 static func_ptr __do_global_dtors_aux_fini_array_entry[]
339 __attribute__ ((__unused__, section(".fini_array"))) 339 __attribute__ ((__used__, section(".fini_array")))
340 = { __do_global_dtors_aux }; 340 = { __do_global_dtors_aux };
341 #else /* !FINI_SECTION_ASM_OP && !FINI_ARRAY_SECTION_ASM_OP */ 341 #else /* !FINI_SECTION_ASM_OP && !FINI_ARRAY_SECTION_ASM_OP */
342 static void __attribute__((used)) 342 static void __attribute__((used))
343 __do_global_dtors_aux_1 (void) 343 __do_global_dtors_aux_1 (void)
344 { 344 {
381 381
382 #ifdef INIT_SECTION_ASM_OP 382 #ifdef INIT_SECTION_ASM_OP
383 CRT_CALL_STATIC_FUNCTION (INIT_SECTION_ASM_OP, frame_dummy) 383 CRT_CALL_STATIC_FUNCTION (INIT_SECTION_ASM_OP, frame_dummy)
384 #else /* defined(INIT_SECTION_ASM_OP) */ 384 #else /* defined(INIT_SECTION_ASM_OP) */
385 static func_ptr __frame_dummy_init_array_entry[] 385 static func_ptr __frame_dummy_init_array_entry[]
386 __attribute__ ((__unused__, section(".init_array"))) 386 __attribute__ ((__used__, section(".init_array")))
387 = { frame_dummy }; 387 = { frame_dummy };
388 #endif /* !defined(INIT_SECTION_ASM_OP) */ 388 #endif /* !defined(INIT_SECTION_ASM_OP) */
389 #endif /* USE_EH_FRAME_REGISTRY || JCR_SECTION_NAME */ 389 #endif /* USE_EH_FRAME_REGISTRY || JCR_SECTION_NAME */
390 390
391 #else /* OBJECT_FORMAT_ELF */ 391 #else /* OBJECT_FORMAT_ELF */
489 #ifdef CTOR_LIST_END 489 #ifdef CTOR_LIST_END
490 CTOR_LIST_END; 490 CTOR_LIST_END;
491 #elif defined(CTORS_SECTION_ASM_OP) 491 #elif defined(CTORS_SECTION_ASM_OP)
492 /* Hack: force cc1 to switch to .data section early, so that assembling 492 /* Hack: force cc1 to switch to .data section early, so that assembling
493 __CTOR_LIST__ does not undo our behind-the-back change to .ctors. */ 493 __CTOR_LIST__ does not undo our behind-the-back change to .ctors. */
494 static func_ptr force_to_data[1] __attribute__ ((__unused__)) = { }; 494 static func_ptr force_to_data[1] __attribute__ ((__used__)) = { };
495 asm (CTORS_SECTION_ASM_OP); 495 asm (CTORS_SECTION_ASM_OP);
496 STATIC func_ptr __CTOR_END__[1] 496 STATIC func_ptr __CTOR_END__[1]
497 __attribute__((aligned(sizeof(func_ptr)))) 497 __attribute__((aligned(sizeof(func_ptr))))
498 = { (func_ptr) 0 }; 498 = { (func_ptr) 0 };
499 #else 499 #else
507 #elif defined(HIDDEN_DTOR_LIST_END) 507 #elif defined(HIDDEN_DTOR_LIST_END)
508 #ifdef DTORS_SECTION_ASM_OP 508 #ifdef DTORS_SECTION_ASM_OP
509 asm (DTORS_SECTION_ASM_OP); 509 asm (DTORS_SECTION_ASM_OP);
510 #endif 510 #endif
511 func_ptr __DTOR_END__[1] 511 func_ptr __DTOR_END__[1]
512 __attribute__ ((unused, 512 __attribute__ ((used,
513 #ifndef DTORS_SECTION_ASM_OP 513 #ifndef DTORS_SECTION_ASM_OP
514 section(".dtors"), 514 section(".dtors"),
515 #endif 515 #endif
516 aligned(sizeof(func_ptr)), visibility ("hidden"))) 516 aligned(sizeof(func_ptr)), visibility ("hidden")))
517 = { (func_ptr) 0 }; 517 = { (func_ptr) 0 };
518 #elif defined(DTORS_SECTION_ASM_OP) 518 #elif defined(DTORS_SECTION_ASM_OP)
519 asm (DTORS_SECTION_ASM_OP); 519 asm (DTORS_SECTION_ASM_OP);
520 STATIC func_ptr __DTOR_END__[1] 520 STATIC func_ptr __DTOR_END__[1]
521 __attribute__ ((unused, aligned(sizeof(func_ptr)))) 521 __attribute__ ((used, aligned(sizeof(func_ptr))))
522 = { (func_ptr) 0 }; 522 = { (func_ptr) 0 };
523 #else 523 #else
524 STATIC func_ptr __DTOR_END__[1] 524 STATIC func_ptr __DTOR_END__[1]
525 __attribute__((unused, section(".dtors"), aligned(sizeof(func_ptr)))) 525 __attribute__((used, section(".dtors"), aligned(sizeof(func_ptr))))
526 = { (func_ptr) 0 }; 526 = { (func_ptr) 0 };
527 #endif 527 #endif
528 528
529 #ifdef EH_FRAME_SECTION_NAME 529 #ifdef EH_FRAME_SECTION_NAME
530 /* Terminate the frame unwind info section with a 4byte 0 as a sentinel; 530 /* Terminate the frame unwind info section with a 4byte 0 as a sentinel;
537 typedef short int32; 537 typedef short int32;
538 # else 538 # else
539 # error "Missing a 4 byte integer" 539 # error "Missing a 4 byte integer"
540 # endif 540 # endif
541 STATIC EH_FRAME_SECTION_CONST int32 __FRAME_END__[] 541 STATIC EH_FRAME_SECTION_CONST int32 __FRAME_END__[]
542 __attribute__ ((unused, section(EH_FRAME_SECTION_NAME), 542 __attribute__ ((used, section(EH_FRAME_SECTION_NAME),
543 aligned(sizeof(int32)))) 543 aligned(sizeof(int32))))
544 = { 0 }; 544 = { 0 };
545 #endif /* EH_FRAME_SECTION_NAME */ 545 #endif /* EH_FRAME_SECTION_NAME */
546 546
547 #ifdef JCR_SECTION_NAME 547 #ifdef JCR_SECTION_NAME
548 /* Null terminate the .jcr section array. */ 548 /* Null terminate the .jcr section array. */
549 STATIC void *__JCR_END__[1] 549 STATIC void *__JCR_END__[1]
550 __attribute__ ((unused, section(JCR_SECTION_NAME), 550 __attribute__ ((used, section(JCR_SECTION_NAME),
551 aligned(sizeof(void *)))) 551 aligned(sizeof(void *))))
552 = { 0 }; 552 = { 0 };
553 #endif /* JCR_SECTION_NAME */ 553 #endif /* JCR_SECTION_NAME */
554 554
555 #ifdef INIT_ARRAY_SECTION_ASM_OP 555 #ifdef INIT_ARRAY_SECTION_ASM_OP