public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, mingw32] Mark ".text.unlikely" as executable
@ 2008-03-23  3:54 Zuxy Meng
  2008-03-25  9:52 ` Danny Smith
  0 siblings, 1 reply; 9+ messages in thread
From: Zuxy Meng @ 2008-03-23  3:54 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 340 bytes --]

Hi,

Unlike varasm.c config/i386/winnt.c lacks proper handling of the 
".text.unlikely" section and will make it writable instead of executable. 
This patch fixes PR35661. Bootstrapped and tested on i386-pc-mingw32.

PR target/35661
        *config/i386/winnt.c (i386_pe_section_type_flags): Mark 
".text.unlikely" as executable

-- 
Zuxy 

[-- Attachment #2: unlikely.diff --]
[-- Type: application/octet-stream, Size: 644 bytes --]

--- gcc\config\i386\winnt.c.orig	Thu Sep 13 10:17:51 2007
+++ gcc\config\i386\winnt.c	Sun Mar 23 02:34:12 2008
@@ -420,6 +420,15 @@ i386_pe_section_type_flags (tree decl, c
     flags = SECTION_CODE;
   else if (decl && decl_readonly_section (decl, reloc))
     flags = 0;
+  else if (current_function_decl
+	  && cfun
+	  && cfun->unlikely_text_section_name
+	  && strcmp (name, cfun->unlikely_text_section_name) == 0)
+    flags = SECTION_CODE;
+  else if (!decl
+	   && (!current_function_decl || !cfun)
+	   && strcmp (name, UNLIKELY_EXECUTED_TEXT_SECTION_NAME) == 0)
+    flags = SECTION_CODE;
   else
     {
       flags = SECTION_WRITE;

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH, mingw32] Mark ".text.unlikely" as executable
  2008-03-23  3:54 [PATCH, mingw32] Mark ".text.unlikely" as executable Zuxy Meng
@ 2008-03-25  9:52 ` Danny Smith
  2008-03-25 11:16   ` Zuxy Meng
  0 siblings, 1 reply; 9+ messages in thread
From: Danny Smith @ 2008-03-25  9:52 UTC (permalink / raw)
  To: Zuxy Meng; +Cc: gcc-patches

On Sun, Mar 23, 2008 at 2:32 PM, Zuxy Meng <zuxy.meng@gmail.com> wrote:
> Hi,
>
>  Unlike varasm.c config/i386/winnt.c lacks proper handling of the
>  ".text.unlikely" section and will make it writable instead of executable.
>  This patch fixes PR35661. Bootstrapped and tested on i386-pc-mingw32.
>
>  PR target/35661
>         *config/i386/winnt.c (i386_pe_section_type_flags): Mark
>  ".text.unlikely" as executable
>
>  --
>  Zuxy
>

Hello Zuxy
Although this Change is probably small enough to not require a
copyright assignment  to FSF, I note that you have other patches
pending (eg http://gcc.gnu.org/ml/gcc-patches/2008-03/msg01344.html)
which are larger and which I think are legally significant.  I'm
hoping that you will continue to submit patches to gcc.

Would you be willing to assign copyright to the Free Software
Foundation, so that we could install in gcc?

Danny

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH, mingw32] Mark ".text.unlikely" as executable
  2008-03-25  9:52 ` Danny Smith
@ 2008-03-25 11:16   ` Zuxy Meng
  2008-03-26  7:20     ` Danny Smith
  0 siblings, 1 reply; 9+ messages in thread
From: Zuxy Meng @ 2008-03-25 11:16 UTC (permalink / raw)
  To: Danny Smith; +Cc: gcc-patches

Hi,

2008/3/25, Danny Smith <dansmister@gmail.com>:
> On Sun, Mar 23, 2008 at 2:32 PM, Zuxy Meng <zuxy.meng@gmail.com> wrote:
> > Hi,
> >
> >  Unlike varasm.c config/i386/winnt.c lacks proper handling of the
> >  ".text.unlikely" section and will make it writable instead of executable.
> >  This patch fixes PR35661. Bootstrapped and tested on i386-pc-mingw32.
> >
> >  PR target/35661
> >         *config/i386/winnt.c (i386_pe_section_type_flags): Mark
> >  ".text.unlikely" as executable
> >
> >  --
> >  Zuxy
> >
>
> Hello Zuxy
> Although this Change is probably small enough to not require a
> copyright assignment  to FSF, I note that you have other patches
> pending (eg http://gcc.gnu.org/ml/gcc-patches/2008-03/msg01344.html)
> which are larger and which I think are legally significant.  I'm
> hoping that you will continue to submit patches to gcc.
>
> Would you be willing to assign copyright to the Free Software
> Foundation, so that we could install in gcc?

Sure. What should I do?
-- 
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH, mingw32] Mark ".text.unlikely" as executable
  2008-03-25 11:16   ` Zuxy Meng
@ 2008-03-26  7:20     ` Danny Smith
  2008-03-28 11:32       ` Zuxy Meng
  0 siblings, 1 reply; 9+ messages in thread
From: Danny Smith @ 2008-03-26  7:20 UTC (permalink / raw)
  To: Zuxy Meng; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 420 bytes --]

On Tue, Mar 25, 2008 at 10:52 PM, Zuxy Meng <zuxy.meng@gmail.com> wrote:
> Hi,
>
> 2008/3/25, Danny Smith <dansmister@gmail.com>:
>
> >
> > Would you be willing to assign copyright to the Free Software
> > Foundation, so that we could install in gcc?
>
> Sure. What should I do?
> --

Attached is the template for requesting copyright assignment forms.
Please complete and email to
address given in form.

Thanks,
Danny

[-- Attachment #2: request-assign.future --]
[-- Type: application/octet-stream, Size: 971 bytes --]

Please email the following information to assign@gnu.org, and we
will send you the assignment form for your past and future changes.

Please use your full legal name (in ASCII characters) as the subject
line of the message.
----------------------------------------------------------------------
REQUEST: SEND FORM FOR PAST AND FUTURE CHANGES

[What is the name of the program or package you're contributing to?]


[Did you copy any files or text written by someone else in these changes?
Even if that material is free software, we need to know about it.]


[Do you have an employer who might have a basis to claim to own
your changes?  Do you attend a school which might make such a claim?]


[For the copyright registration, what country are you a citizen of?]


[What year were you born?]


[Please write your email address here.]


[Please write your postal address here.]





[Which files have you changed so far, and which new files have you written
so far?]







^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH, mingw32] Mark ".text.unlikely" as executable
  2008-03-26  7:20     ` Danny Smith
@ 2008-03-28 11:32       ` Zuxy Meng
  2008-03-30  9:51         ` Danny Smith
  0 siblings, 1 reply; 9+ messages in thread
From: Zuxy Meng @ 2008-03-28 11:32 UTC (permalink / raw)
  To: Danny Smith; +Cc: gcc-patches

Hi,

2008/3/26, Danny Smith <dansmister@gmail.com>:
> On Tue, Mar 25, 2008 at 10:52 PM, Zuxy Meng <zuxy.meng@gmail.com> wrote:
> > Hi,
> >
> > 2008/3/25, Danny Smith <dansmister@gmail.com>:
> >
> > >
> > > Would you be willing to assign copyright to the Free Software
> > > Foundation, so that we could install in gcc?
> >
> > Sure. What should I do?
> > --
>
> Attached is the template for requesting copyright assignment forms.
> Please complete and email to
> address given in form.

I've sent it. And what about the patch itself? Is it OK for 4.3.1?

-- 
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH, mingw32] Mark ".text.unlikely" as executable
  2008-03-28 11:32       ` Zuxy Meng
@ 2008-03-30  9:51         ` Danny Smith
  2008-04-01  3:29           ` Zuxy Meng
  0 siblings, 1 reply; 9+ messages in thread
From: Danny Smith @ 2008-03-30  9:51 UTC (permalink / raw)
  To: Zuxy Meng; +Cc: gcc-patches

On Fri, Mar 28, 2008 at 9:42 PM, Zuxy Meng <zuxy.meng@gmail.com> wrote:
> Hi,
>
>  2008/3/26, Danny Smith <dansmister@gmail.com>:
>
>
> > On Tue, Mar 25, 2008 at 10:52 PM, Zuxy Meng <zuxy.meng@gmail.com> wrote:
>  > > Hi,
>  > >
>  > > 2008/3/25, Danny Smith <dansmister@gmail.com>:
>  > >
>  > > >
>  > > > Would you be willing to assign copyright to the Free Software
>  > > > Foundation, so that we could install in gcc?
>  > >
>  > > Sure. What should I do?
>  > > --
>  >
>  > Attached is the template for requesting copyright assignment forms.
>  > Please complete and email to
>  > address given in form.
>
>  I've sent it. And what about the patch itself? Is it OK for 4.3.1?
>
Yes.
Danny
>
>
>  --
>  Zuxy
>  Beauty is truth,
>  While truth is beauty.
>  PGP KeyID: E8555ED6
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH, mingw32] Mark ".text.unlikely" as executable
  2008-03-30  9:51         ` Danny Smith
@ 2008-04-01  3:29           ` Zuxy Meng
  2008-04-08 13:57             ` Zuxy
  0 siblings, 1 reply; 9+ messages in thread
From: Zuxy Meng @ 2008-04-01  3:29 UTC (permalink / raw)
  To: Danny Smith; +Cc: gcc-patches

2008/3/30, Danny Smith <dansmister@gmail.com>:
> On Fri, Mar 28, 2008 at 9:42 PM, Zuxy Meng <zuxy.meng@gmail.com> wrote:
> > Hi,
> >
> >  2008/3/26, Danny Smith <dansmister@gmail.com>:
> >
> >
> > > On Tue, Mar 25, 2008 at 10:52 PM, Zuxy Meng <zuxy.meng@gmail.com> wrote:
> >  > > Hi,
> >  > >
> >  > > 2008/3/25, Danny Smith <dansmister@gmail.com>:
> >  > >
> >  > > >
> >  > > > Would you be willing to assign copyright to the Free Software
> >  > > > Foundation, so that we could install in gcc?
> >  > >
> >  > > Sure. What should I do?
> >  > > --
> >  >
> >  > Attached is the template for requesting copyright assignment forms.
> >  > Please complete and email to
> >  > address given in form.
> >
> >  I've sent it. And what about the patch itself? Is it OK for 4.3.1?
> >
> Yes.
> Danny

Thanks! Could somebody apply it?

-- 
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH, mingw32] Mark ".text.unlikely" as executable
  2008-04-01  3:29           ` Zuxy Meng
@ 2008-04-08 13:57             ` Zuxy
  2008-05-11 22:42               ` Danny Smith
  0 siblings, 1 reply; 9+ messages in thread
From: Zuxy @ 2008-04-08 13:57 UTC (permalink / raw)
  To: gcc-patches

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1012 bytes --]

"Zuxy Meng" <zuxy.meng@gmail.com> дÈëÏûÏ¢ 
news:a18e06b40803312029r61d10251sb15c56c41e5659bf@mail.gmail.com...
> 2008/3/30, Danny Smith <dansmister@gmail.com>:
>> On Fri, Mar 28, 2008 at 9:42 PM, Zuxy Meng <zuxy.meng@gmail.com> wrote:
>> > Hi,
>> >
>> >  2008/3/26, Danny Smith <dansmister@gmail.com>:
>> >
>> >
>> > > On Tue, Mar 25, 2008 at 10:52 PM, Zuxy Meng <zuxy.meng@gmail.com> 
>> > > wrote:
>> >  > > Hi,
>> >  > >
>> >  > > 2008/3/25, Danny Smith <dansmister@gmail.com>:
>> >  > >
>> >  > > >
>> >  > > > Would you be willing to assign copyright to the Free Software
>> >  > > > Foundation, so that we could install in gcc?
>> >  > >
>> >  > > Sure. What should I do?
>> >  > > --
>> >  >
>> >  > Attached is the template for requesting copyright assignment forms.
>> >  > Please complete and email to
>> >  > address given in form.
>> >
>> >  I've sent it. And what about the patch itself? Is it OK for 4.3.1?
>> >
>> Yes.
>> Danny
>
> Thanks! Could somebody apply it?

Ping....

-- 
Zuxy 



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH, mingw32] Mark ".text.unlikely" as executable
  2008-04-08 13:57             ` Zuxy
@ 2008-05-11 22:42               ` Danny Smith
  0 siblings, 0 replies; 9+ messages in thread
From: Danny Smith @ 2008-05-11 22:42 UTC (permalink / raw)
  To: Zuxy; +Cc: gcc-patches

On Wed, Apr 9, 2008 at 12:47 AM, Zuxy <zuxy.meng@gmail.com> wrote:
> "Zuxy Meng" <zuxy.meng@gmail.com> дÈëÏûÏ¢
> news:a18e06b40803312029r61d10251sb15c56c41e5659bf@mail.gmail.com...
>> 2008/3/30, Danny Smith <dansmister@gmail.com>:
>>> On Fri, Mar 28, 2008 at 9:42 PM, Zuxy Meng <zuxy.meng@gmail.com> wrote:
>>> > Hi,
>>> >
>>> >  2008/3/26, Danny Smith <dansmister@gmail.com>:
>>> >
>>> >
>>> > > On Tue, Mar 25, 2008 at 10:52 PM, Zuxy Meng <zuxy.meng@gmail.com>
>>> > > wrote:
>>> >  > > Hi,
>>> >  > >
>>> >  > > 2008/3/25, Danny Smith <dansmister@gmail.com>:
>>> >  > >
>>> >  > > >
>>> >  > > > Would you be willing to assign copyright to the Free Software
>>> >  > > > Foundation, so that we could install in gcc?
>>> >  > >
>>> >  > > Sure. What should I do?
>>> >  > > --
>>> >  >
>>> >  > Attached is the template for requesting copyright assignment forms.
>>> >  > Please complete and email to
>>> >  > address given in form.
>>> >
>>> >  I've sent it. And what about the patch itself? Is it OK for 4.3.1?
>>> >
>>> Yes.
>>> Danny
>>
>> Thanks! Could somebody apply it?
>
> Ping....
>
> --
> Zuxy
>

Committed to 4_3-branch as revision 135188
Index: config/i386/winnt.c
===================================================================
--- config/i386/winnt.c	(revision 135187)
+++ config/i386/winnt.c	(working copy)
@@ -420,6 +420,15 @@
     flags = SECTION_CODE;
   else if (decl && decl_readonly_section (decl, reloc))
     flags = 0;
+  else if (current_function_decl
+	  && cfun
+	  && cfun->unlikely_text_section_name
+	  && strcmp (name, cfun->unlikely_text_section_name) == 0)
+    flags = SECTION_CODE;
+  else if (!decl
+	   && (!current_function_decl || !cfun)
+	   && strcmp (name, UNLIKELY_EXECUTED_TEXT_SECTION_NAME) == 0)
+    flags = SECTION_CODE;
   else
     {
       flags = SECTION_WRITE;


>
>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-05-11 21:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-23  3:54 [PATCH, mingw32] Mark ".text.unlikely" as executable Zuxy Meng
2008-03-25  9:52 ` Danny Smith
2008-03-25 11:16   ` Zuxy Meng
2008-03-26  7:20     ` Danny Smith
2008-03-28 11:32       ` Zuxy Meng
2008-03-30  9:51         ` Danny Smith
2008-04-01  3:29           ` Zuxy Meng
2008-04-08 13:57             ` Zuxy
2008-05-11 22:42               ` Danny Smith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).