gcc/boehm-gc
Iain Sandoe 46a99b06bc re PR target/26427 (with -fsection-anchors with zero sized structs)
PR target/26427
	PR target/33120
	PR testsuite/35710

gcc:
	* config/i386/darwin.h (ASM_OUTPUT_COMMON): Remove
	(ASM_OUTPUT_LOCAL): Likewise.
	* config/darwin-protos.h (darwin_asm_declare_object_name): New.
	(darwin_output_aligned_bss): Likewise.
	(darwin_asm_output_aligned_decl_local): Likewise.
	(darwin_asm_output_aligned_decl_common): Likewise.
	(darwin_use_anchors_for_symbol_p): Likewise.
	* config/rs6000/darwin.h (ASM_OUTPUT_COMMON): Remove.
	(TARGET_ASM_OUTPUT_ANCHOR): Define.
	(TARGET_USE_ANCHORS_FOR_SYMBOL_P): Define.
	(DARWIN_SECTION_ANCHORS): Set to 1.
	* config/darwin.c (emit_aligned_common): New var.
	(darwin_init_sections): Check that the Darwin private zero-size section
	marker is in range.
	(darwin_text_section): Check for zero-sized objects.
	(darwin_mergeable_string_section): Likewise.
	(darwin_mergeable_constant_section): Likewise.
	(machopic_select_section): Adjust to check for zero-sized objects.
	Assert that OBJC meta data are non-zero sized.
	(darwin_asm_declare_object_name): New.
	(darwin_asm_declare_constant_name): Adjust for zero-sized
	object sections.
	(BYTES_ZFILL): Define.
	(darwin_emit_weak_or_comdat): New.
	(darwin_emit_local_bss): New.
	(darwin_emit_common): New.
	(darwin_output_aligned_bss): New.
	(darwin_asm_output_aligned_decl_common): New.
	(darwin_asm_output_aligned_decl_local): New.
	(darwin_file_end): Disable subsections_via_symbols when section
	anchoring is active.
	(darwin_asm_output_anchor): Re-enable.
	(darwin_use_anchors_for_symbol_p): New.
	(darwin_override_options): Check for versions that can emit
	aligned common.  Update usage of flags to current.
	* config/darwin-sections.def: Update comments and flags for
	non-anchor sections.  zobj_const_section, zobj_data_section,
	zobj_bss_section, zobj_const_data_section: New.
	* config/darwin.h (ASM_DECLARE_OBJECT_NAME): Redefine.
	(ASM_OUTPUT_ALIGN): Make whitespace output consistent.
	(L2_MAX_OFILE_ALIGNMENT): Define.
	(ASM_OUTPUT_ALIGNED_BSS): Define.
	(ASM_OUTPUT_ALIGNED_DECL_LOCAL): Define.
	(ASM_OUTPUT_ALIGNED_DECL_COMMON): Define.
	(SECTION_NO_ANCHOR): Define.
	(TARGET_ASM_OUTPUT_ANCHOR) Define with a default of NULL.
	(DARWIN_SECTION_ANCHORS): Define with a default of 0.

boehm-gc:
	* dyn_load.c (GC_register_dynamic_libraries/DARWIN):  Add new writable
	data section names.
	(GC_dyld_name_for_hdr): Adjust layout.
	(GC_dyld_image_add): Adjust layout, add new Darwin sections, adjust
	debug to name the sections.
	(GC_dyld_image_remove): Adjust layout, remove new Darwin sections,
	adjust debug to name the sections.
	(GC_register_dynamic_libraries): Adjust layout.
	(GC_init_dyld): Likewise.
	(GC_register_main_static_data): Likewise.

gcc/testsuite:
	* gcc.target/powerpc/darwin-abi-12.c: Adjust for new allocators.
	* gcc.dg/pr26427.c: Remove redundant warning for powerpc.
	* gcc.dg/darwin-comm.c: Adjust for new allocators.
	* gcc.dg/darwin-sections.c: New test.
	* g++.dg/ext/instantiate2.C: Adjust for new allocators.


Co-Authored-By: Mike Stump <mrs@gcc.gnu.org>

From-SVN: r167242
2010-11-29 14:58:16 +00:00
..
cord Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
doc Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
include configure.ac: Rewrite DGUX check to use GC_CFLAGS, and -O0 check to remove the need for MY_CFLAGS. 2010-10-28 10:58:48 +00:00
Mac_files Import GC 6.3alpha1. 2003-07-28 04:18:23 +00:00
tests leak_test.c (main): Declare as int. 2010-05-13 00:45:35 +02:00
aclocal.m4 Update to Automake 1.11.1. 2010-04-02 18:18:06 +00:00
add_gc_prefix.c
allchblk.c Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
alloc.c Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
alpha_mach_dep.S Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
AmigaOS.c
backgraph.c backgraph.c, gc_priv.h (GC_traverse_back_graph, [...]): split GC_traverse_back_graph. 2004-08-28 00:41:41 +00:00
BCC_MAKEFILE configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
blacklst.c
callprocs
ChangeLog re PR target/26427 (with -fsection-anchors with zero sized structs) 2010-11-29 14:58:16 +00:00
checksums.c configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
configure configure: Regenerate. 2010-10-28 22:37:36 +00:00
configure.ac configure.ac: Rewrite DGUX check to use GC_CFLAGS, and -O0 check to remove the need for MY_CFLAGS. 2010-10-28 10:58:48 +00:00
configure.host re PR libgcj/19823 (java fails with non-executable memory) 2005-02-16 04:10:42 +00:00
darwin_stop_world.c os_dep.c (defined(MPROTECT_VDB) && defined(DARWIN)): Moved recently added defines to include/private/gc_priv.h 2007-01-19 20:19:35 +01:00
dbg_mlc.c ffi.h.in (ffi_closure_alloc, [...]): New. 2007-03-07 07:27:25 +00:00
depcomp Initial revision 2003-07-28 03:46:07 +00:00
digimars.mak
dyn_load.c re PR target/26427 (with -fsection-anchors with zero sized structs) 2010-11-29 14:58:16 +00:00
EMX_MAKEFILE
finalize.c ffi.h.in (ffi_closure_alloc, [...]): New. 2007-03-07 07:27:25 +00:00
gc_cpp.cc Import GC 6.3alpha1. 2003-07-28 04:18:23 +00:00
gc_cpp.cpp
gc_dlopen.c Import GC 6.3alpha1. 2003-07-28 04:18:23 +00:00
gc.mak
gcc_support.c
gcj_mlc.c configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
gcname.c
headers.c configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
hpux_test_and_clear.s
ia64_save_regs_in_stack.s
if_mach.c Import GC 6.3alpha1. 2003-07-28 04:18:23 +00:00
if_not_there.c configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
mach_dep.c Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
MacOS.c
MacProjects.sit.hqx
Makefile.am configure.ac: Rewrite DGUX check to use GC_CFLAGS, and -O0 check to remove the need for MY_CFLAGS. 2010-10-28 10:58:48 +00:00
Makefile.direct Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
Makefile.dist configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
Makefile.dj configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
Makefile.DLLs
Makefile.in configure.ac: Rewrite DGUX check to use GC_CFLAGS, and -O0 check to remove the need for MY_CFLAGS. 2010-10-28 10:58:48 +00:00
malloc.c configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
mallocx.c Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
mark_rts.c PR target/42811 (prerequisite) 2010-03-21 19:34:19 +00:00
mark.c Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
mips_sgi_mach_dep.s ffi.c: Use _ABIN32, _ABIO32 instead of external _MIPS_SIM_NABI32, _MIPS_SIM_ABI32. 2003-10-20 18:37:22 +00:00
mips_ultrix_mach_dep.s
misc.c re PR boehm-gc/29068 (Bootstrap fails building libjava on SPARC/Solaris) 2006-09-14 18:06:04 +00:00
new_hblk.c configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
NT_MAKEFILE configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
NT_STATIC_THREADS_MAKEFILE Initial revision 2004-08-12 22:14:23 +01:00
NT_THREADS_MAKEFILE
obj_map.c
OS2_MAKEFILE
os_dep.c PR target/42811 (prerequisite) 2010-03-21 19:34:19 +00:00
pc_excludes
pcr_interface.c
PCR-Makefile
powerpc_darwin_mach_dep.s Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
pthread_stop_world.c gc.h (GC_is_thread_suspended): Declare. 2007-04-23 21:10:09 +00:00
pthread_support.c dyn_load.c: Fix typo. 2010-10-11 19:06:24 +00:00
ptr_chck.c PR target/42811 (prerequisite) 2010-03-21 19:34:19 +00:00
real_malloc.c
reclaim.c Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
rs6000_mach_dep.s
setjmp_t.c
SMakefile.amiga
sparc_mach_dep.S Import GC 6.3alpha1. 2003-07-28 04:18:23 +00:00
sparc_netbsd_mach_dep.s
sparc_sunos4_mach_dep.s
specific.c specific.c: Check GC_LINUX_THREADS before including private/specific.h. 2004-08-17 00:06:46 +01:00
stubborn.c
threadlibs.c Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
threads.mk.in - checkin threads.mk.in. 2008-07-18 10:37:22 +00:00
typd_mlc.c configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
version.h Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
WCC_MAKEFILE
win32_threads.c win32_threads.c (GC_get_thread_stack_base): Implement for Cygwin. 2009-05-17 20:07:18 +00:00