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]

Re: Patch ping



On 3 Feb 2011, at 16:38, Jakub Jelinek wrote:


On Thu, Feb 03, 2011 at 08:27:03AM -0800, Richard Henderson wrote:
On 02/03/2011 08:24 AM, IainS wrote:
Well, it perhaps could be just SECTION_MACH_DEP, at least I can't see any
reasons why it couldn't, just the assert required that it was bigger:

hmm, won't that output.h to be before every instance of darwin.h?

note to self: 'please engage brain before hitting send' ;)


No, just so long as it's included before SECTION_NO_ANCHOR is used.
What's in darwin.h is merely a macro definition, not a "real" use.

Well, I see no reason why SECTION_NO_ANCHOR could not be defined in config/darwin.c instead. It is used just in config/darwin.c and config/darwin-sections.def. While the latter is included by both config/darwin.c and config/darwin.h, in darwin.h only the NAME from it matters.

Yes, that seems better...


I will test this change on its own on Darwin OK?

(that is, if the whole patch needs checking then ping me - because this needs doing on PPC which takes a while)>

Iain


So something like (separate patch, if you want to test it together with the PR31490 patch just remove the config/darwin.h hunk from the PR31490 patch):

2011-02-03 Jakub Jelinek <jakub@redhat.com>

	* config/darwin.h (SECTION_NO_ANCHOR): Remove.
	* config/darwin.c (SECTION_NO_ANCHOR): Define.
	(darwin_init_sections): Remove assertion.

--- gcc/config/darwin.c.jj	2011-01-15 11:26:39.411777352 +0100
+++ gcc/config/darwin.c	2011-02-03 17:35:15.074388782 +0100
@@ -160,6 +160,11 @@ output_objc_section_asm_op (const void *
  output_section_asm_op (directive);
}

+
+/* Private flag applied to disable section-anchors in a particular section. */
+#define SECTION_NO_ANCHOR SECTION_MACH_DEP
+
+
/* Implement TARGET_ASM_INIT_SECTIONS. */


void
@@ -177,10 +182,6 @@ darwin_init_sections (void)
readonly_data_section = darwin_sections[const_section];
exception_section = darwin_sections[darwin_exception_section];
eh_frame_section = darwin_sections[darwin_eh_frame_section];
-
- /* Make sure that there is no conflict between the 'no anchor' section
- flag declared in darwin.h and the section flags declared in output.h. */
- gcc_assert (SECTION_NO_ANCHOR > SECTION_MACH_DEP);
}


int
--- gcc/config/darwin.h.jj	2011-01-28 20:34:16.455652744 +0100
+++ gcc/config/darwin.h	2011-02-03 17:33:25.676670013 +0100
@@ -651,11 +651,6 @@ int darwin_label_is_anonymous_local_objc
/* The generic version, archs should over-ride where required.  */
#define MACHOPIC_NL_SYMBOL_PTR_SECTION ".non_lazy_symbol_pointer"

-/* Private flag applied to disable section-anchors in a particular section.
- This needs to be kept in sync with the flags used by varasm.c (defined in
- output.h). */
-#define SECTION_NO_ANCHOR 0x2000000
-
/* Declare the section variables. */
#ifndef USED_FOR_TARGET
enum darwin_section_enum {



Jakub


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