This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH/RFC] Support -fsection-anchors on darwin


This patch implements most of the support needed for
-fsection-anchors on Darwin.  The only regressions with
-fsection-anchors enabled are in the objc testcase.  One
is a Darwin specific regression which can be fixed easily
(by passing the correct flags for a section).

The other regressions are the objc problem which Richard S.
mentioned.

What do people think about this patch?  If people think this
is the correct approach for things, I will fix the objc testcase
and then resubmit it.

I had bootstrapped and tested it on powerpc-darwin but with
C and objc only.  I did bootstrap also with -fsection-anchors
turned on and it worked.

I did have to disable -fsection-anchors for BSS variables
because otherwise the bootstrap would fail and the current
infrastructure for anchors does not support BSS sections
yet.

Thanks,
Andrew Pinski

ChangeLog:

	* varasm.c (use_blocks_for_decl_p): Don't use
	blocks for BSS type decls.
	* config/darwin-protos.h (darwin_asm_output_anchor):
	Declare.
	* config/darwin-sections.def (cstring_section):
	Add SECTION_MERGE to the flags.
	(literal4_section): Likewise.
	(literal8_section): Likewise.
	* config/darwin.c (darwin_asm_output_anchor): New
	function.
	* config/darwin.h (TARGET_ASM_OUTPUT_ANCHOR): Define.


Attachment: anchor.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]