public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [Patch] include/coff/xcoff.h: add new macros
@ 2011-04-18 14:28 Tristan Gingold
  2011-04-26  7:43 ` Ping " Tristan Gingold
  0 siblings, 1 reply; 6+ messages in thread
From: Tristan Gingold @ 2011-04-18 14:28 UTC (permalink / raw)
  To: binutils

Hi,

this patch updates include/coff/xcoff.h with new macros.  Some were already present
in AIX 5.3 (F_FDPR_PROF), some were added by AIX 6 (the TLS) and some by AIX 7 (Dwarf).

Ok for trunk ?

Tristan.

include/coff
2011-04-18  Tristan Gingold  <gingold@adacore.com>

	* xcoff.h (F_FDPR_PROF, F_FDPR_OPTI, F_DSA, F_VARPG, F_LPTEXT)
	(F_LPDATA, F_LOADONLY, F_NONEXEC, STYP_DWARF, SSUBTYP_DWINFO)
	(SSUBTYP_DWLINE, SSUBTYP_DWPBNMS, SSUBTYP_DWPBTYP)
	(SSUBTYP_DWARNGE, SSUBTYP_DWABREV, SSUBTYP_DWSTR)
	(SSUBTYP_DWRNGES, STYP_TDATA, STYP_TBSS, R_TLS, R_TLS_IE)
	(R_TLS_LD, R_TLS_LE, R_TLSM, R_TLSML, R_TOCU, R_TOCL, C_DWARF):
	New macros.

Index: include/coff/xcoff.h
===================================================================
RCS file: /cvs/src/src/include/coff/xcoff.h,v
retrieving revision 1.20
diff -c -r1.20 xcoff.h
*** include/coff/xcoff.h	15 Apr 2010 10:26:07 -0000	1.20
--- include/coff/xcoff.h	18 Apr 2011 14:25:09 -0000
***************
*** 24,29 ****
--- 24,55 ----
  #ifndef _INTERNAL_XCOFF_H
  #define _INTERNAL_XCOFF_H
  
+ /* XCOFF specific f_flags.  */
+ 
+ /* File was profiled with fdpr.  */
+ #define F_FDPR_PROF 0x0010
+ 
+ /* File was reordered with fdpr.  */
+ #define F_FDPR_OPTI 0x0020
+ 
+ /* File use very large program support.  */
+ #define F_DSA       0x0040
+ 
+ /* One aux header specifying medium page sizes is non-zero.  */
+ #define F_VARPG     0x0100
+ 
+ /* Executable requires large pages for text.  */
+ #define F_LPTEXT    0x0400
+ 
+ /* Executable requires large pages for data.  */
+ #define F_LPDATA    0x0800
+ 
+ /* Archive member ignored by the linker.  */
+ #define F_LOADONLY  0x4000
+ 
+ /* Read/write sections are non-executable.  */
+ #define F_NONEXEC   0x8000
+ 
  /* Linker */
  
  /* Names of "special" sections.  */
***************
*** 35,59 ****
  #define _EXCEPT ".except"
  #define _TYPCHK ".typchk"
  
! /* XCOFF uses a special .loader section with type STYP_LOADER.  */
! #define STYP_LOADER 0x1000
  
! /* XCOFF uses a special .debug section with type STYP_DEBUG.  */
! #define STYP_DEBUG 0x2000
  
! /* XCOFF handles line number or relocation overflow by creating
!    another section header with STYP_OVRFLO set.  */
! #define STYP_OVRFLO 0x8000
  
  /* Specifies an exception section.  A section of this type provides 
     information to identify the reason that a trap or ececptin occured within 
     and executable object program */
  #define STYP_EXCEPT 0x0100
  
  /* Specifies a type check section.  A section of this type contains parameter 
     argument type check strings used by the AIX binder.  */
  #define STYP_TYPCHK 0x4000
  
  #define	RS6K_AOUTHDR_OMAGIC 0x0107 /* old: text & data writeable */
  #define	RS6K_AOUTHDR_NMAGIC 0x0108 /* new: text r/o, data r/w */
  #define	RS6K_AOUTHDR_ZMAGIC 0x010B /* paged: text r/o, both page-aligned */
--- 61,104 ----
  #define _EXCEPT ".except"
  #define _TYPCHK ".typchk"
  
! /* XCOFF uses special .dwXXX sections with the type STYP_DWARF.  */
! #define STYP_DWARF  0x0010
  
! /* High-order 16-bits dwarf subtypes.  */
! #define SSUBTYP_DWINFO  0x10000
! #define SSUBTYP_DWLINE  0x20000
! #define SSUBTYP_DWPBNMS 0x30000
! #define SSUBTYP_DWPBTYP 0x40000
! #define SSUBTYP_DWARNGE 0x50000
! #define SSUBTYP_DWABREV 0x60000
! #define SSUBTYP_DWSTR   0x70000
! #define SSUBTYP_DWRNGES 0x80000
  
! /* XCOFF uses a special .loader section with type STYP_LOADER.  */
! #define STYP_LOADER 0x1000
  
  /* Specifies an exception section.  A section of this type provides 
     information to identify the reason that a trap or ececptin occured within 
     and executable object program */
  #define STYP_EXCEPT 0x0100
  
+ /* Specifies an initialized thread-local data section.  */
+ #define STYP_TDATA  0x0400
+ 
+ /* Specifies an uninitialized thread-local data section.  */
+ #define STYP_TBSS   0x0800
+ 
+ /* XCOFF uses a special .debug section with type STYP_DEBUG.  */
+ #define STYP_DEBUG  0x2000
+ 
  /* Specifies a type check section.  A section of this type contains parameter 
     argument type check strings used by the AIX binder.  */
  #define STYP_TYPCHK 0x4000
  
+ /* XCOFF handles line number or relocation overflow by creating
+    another section header with STYP_OVRFLO set.  */
+ #define STYP_OVRFLO 0x8000
+ 
  #define	RS6K_AOUTHDR_OMAGIC 0x0107 /* old: text & data writeable */
  #define	RS6K_AOUTHDR_NMAGIC 0x0108 /* new: text r/o, data r/w */
  #define	RS6K_AOUTHDR_ZMAGIC 0x010B /* paged: text r/o, both page-aligned */
***************
*** 84,89 ****
--- 129,142 ----
  #define R_RBAC  (0x19)
  #define R_RBR   (0x1a)
  #define R_RBRC  (0x1b)
+ #define R_TLS   (0x20)
+ #define R_TLS_IE (0x21)
+ #define R_TLS_LD (0x22)
+ #define R_TLS_LE (0x23)
+ #define R_TLSM  (0x24)
+ #define R_TLSML (0x25)
+ #define R_TOCU  (0x30)
+ #define R_TOCL  (0x31)
  
  /* Storage class #defines, from /usr/include/storclass.h that are not already 
     defined in internal.h */
***************
*** 91,96 ****
--- 144,152 ----
  /* Comment string in .info section */
  #define	C_INFO		110	
  
+ /* Dwarf symbol.  */
+ #define C_DWARF		112
+ 
  /* Auxillary Symbol Entries  */
  
  /* x_smtyp values:  */

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

* Ping [Patch] include/coff/xcoff.h: add new macros
  2011-04-18 14:28 [Patch] include/coff/xcoff.h: add new macros Tristan Gingold
@ 2011-04-26  7:43 ` Tristan Gingold
  2011-04-26  8:19   ` Richard Sandiford
  0 siblings, 1 reply; 6+ messages in thread
From: Tristan Gingold @ 2011-04-26  7:43 UTC (permalink / raw)
  To: Richard Sandiford; +Cc: binutils

Ping for:

On Apr 18, 2011, at 4:28 PM, Tristan Gingold wrote:

> Hi,
> 
> this patch updates include/coff/xcoff.h with new macros.  Some were already present
> in AIX 5.3 (F_FDPR_PROF), some were added by AIX 6 (the TLS) and some by AIX 7 (Dwarf).
> 
> Ok for trunk ?
> 
> Tristan.
> 
> include/coff
> 2011-04-18  Tristan Gingold  <gingold@adacore.com>
> 
> 	* xcoff.h (F_FDPR_PROF, F_FDPR_OPTI, F_DSA, F_VARPG, F_LPTEXT)
> 	(F_LPDATA, F_LOADONLY, F_NONEXEC, STYP_DWARF, SSUBTYP_DWINFO)
> 	(SSUBTYP_DWLINE, SSUBTYP_DWPBNMS, SSUBTYP_DWPBTYP)
> 	(SSUBTYP_DWARNGE, SSUBTYP_DWABREV, SSUBTYP_DWSTR)
> 	(SSUBTYP_DWRNGES, STYP_TDATA, STYP_TBSS, R_TLS, R_TLS_IE)
> 	(R_TLS_LD, R_TLS_LE, R_TLSM, R_TLSML, R_TOCU, R_TOCL, C_DWARF):
> 	New macros.
> 
> Index: include/coff/xcoff.h
> ===================================================================
> RCS file: /cvs/src/src/include/coff/xcoff.h,v
> retrieving revision 1.20
> diff -c -r1.20 xcoff.h
> *** include/coff/xcoff.h	15 Apr 2010 10:26:07 -0000	1.20
> --- include/coff/xcoff.h	18 Apr 2011 14:25:09 -0000
> ***************
> *** 24,29 ****
> --- 24,55 ----
>  #ifndef _INTERNAL_XCOFF_H
>  #define _INTERNAL_XCOFF_H
> 
> + /* XCOFF specific f_flags.  */
> + 
> + /* File was profiled with fdpr.  */
> + #define F_FDPR_PROF 0x0010
> + 
> + /* File was reordered with fdpr.  */
> + #define F_FDPR_OPTI 0x0020
> + 
> + /* File use very large program support.  */
> + #define F_DSA       0x0040
> + 
> + /* One aux header specifying medium page sizes is non-zero.  */
> + #define F_VARPG     0x0100
> + 
> + /* Executable requires large pages for text.  */
> + #define F_LPTEXT    0x0400
> + 
> + /* Executable requires large pages for data.  */
> + #define F_LPDATA    0x0800
> + 
> + /* Archive member ignored by the linker.  */
> + #define F_LOADONLY  0x4000
> + 
> + /* Read/write sections are non-executable.  */
> + #define F_NONEXEC   0x8000
> + 
>  /* Linker */
> 
>  /* Names of "special" sections.  */
> ***************
> *** 35,59 ****
>  #define _EXCEPT ".except"
>  #define _TYPCHK ".typchk"
> 
> ! /* XCOFF uses a special .loader section with type STYP_LOADER.  */
> ! #define STYP_LOADER 0x1000
> 
> ! /* XCOFF uses a special .debug section with type STYP_DEBUG.  */
> ! #define STYP_DEBUG 0x2000
> 
> ! /* XCOFF handles line number or relocation overflow by creating
> !    another section header with STYP_OVRFLO set.  */
> ! #define STYP_OVRFLO 0x8000
> 
>  /* Specifies an exception section.  A section of this type provides 
>     information to identify the reason that a trap or ececptin occured within 
>     and executable object program */
>  #define STYP_EXCEPT 0x0100
> 
>  /* Specifies a type check section.  A section of this type contains parameter 
>     argument type check strings used by the AIX binder.  */
>  #define STYP_TYPCHK 0x4000
> 
>  #define	RS6K_AOUTHDR_OMAGIC 0x0107 /* old: text & data writeable */
>  #define	RS6K_AOUTHDR_NMAGIC 0x0108 /* new: text r/o, data r/w */
>  #define	RS6K_AOUTHDR_ZMAGIC 0x010B /* paged: text r/o, both page-aligned */
> --- 61,104 ----
>  #define _EXCEPT ".except"
>  #define _TYPCHK ".typchk"
> 
> ! /* XCOFF uses special .dwXXX sections with the type STYP_DWARF.  */
> ! #define STYP_DWARF  0x0010
> 
> ! /* High-order 16-bits dwarf subtypes.  */
> ! #define SSUBTYP_DWINFO  0x10000
> ! #define SSUBTYP_DWLINE  0x20000
> ! #define SSUBTYP_DWPBNMS 0x30000
> ! #define SSUBTYP_DWPBTYP 0x40000
> ! #define SSUBTYP_DWARNGE 0x50000
> ! #define SSUBTYP_DWABREV 0x60000
> ! #define SSUBTYP_DWSTR   0x70000
> ! #define SSUBTYP_DWRNGES 0x80000
> 
> ! /* XCOFF uses a special .loader section with type STYP_LOADER.  */
> ! #define STYP_LOADER 0x1000
> 
>  /* Specifies an exception section.  A section of this type provides 
>     information to identify the reason that a trap or ececptin occured within 
>     and executable object program */
>  #define STYP_EXCEPT 0x0100
> 
> + /* Specifies an initialized thread-local data section.  */
> + #define STYP_TDATA  0x0400
> + 
> + /* Specifies an uninitialized thread-local data section.  */
> + #define STYP_TBSS   0x0800
> + 
> + /* XCOFF uses a special .debug section with type STYP_DEBUG.  */
> + #define STYP_DEBUG  0x2000
> + 
>  /* Specifies a type check section.  A section of this type contains parameter 
>     argument type check strings used by the AIX binder.  */
>  #define STYP_TYPCHK 0x4000
> 
> + /* XCOFF handles line number or relocation overflow by creating
> +    another section header with STYP_OVRFLO set.  */
> + #define STYP_OVRFLO 0x8000
> + 
>  #define	RS6K_AOUTHDR_OMAGIC 0x0107 /* old: text & data writeable */
>  #define	RS6K_AOUTHDR_NMAGIC 0x0108 /* new: text r/o, data r/w */
>  #define	RS6K_AOUTHDR_ZMAGIC 0x010B /* paged: text r/o, both page-aligned */
> ***************
> *** 84,89 ****
> --- 129,142 ----
>  #define R_RBAC  (0x19)
>  #define R_RBR   (0x1a)
>  #define R_RBRC  (0x1b)
> + #define R_TLS   (0x20)
> + #define R_TLS_IE (0x21)
> + #define R_TLS_LD (0x22)
> + #define R_TLS_LE (0x23)
> + #define R_TLSM  (0x24)
> + #define R_TLSML (0x25)
> + #define R_TOCU  (0x30)
> + #define R_TOCL  (0x31)
> 
>  /* Storage class #defines, from /usr/include/storclass.h that are not already 
>     defined in internal.h */
> ***************
> *** 91,96 ****
> --- 144,152 ----
>  /* Comment string in .info section */
>  #define	C_INFO		110	
> 
> + /* Dwarf symbol.  */
> + #define C_DWARF		112
> + 
>  /* Auxillary Symbol Entries  */
> 
>  /* x_smtyp values:  */
> 

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

* Re: Ping [Patch] include/coff/xcoff.h: add new macros
  2011-04-26  7:43 ` Ping " Tristan Gingold
@ 2011-04-26  8:19   ` Richard Sandiford
  2011-04-26  8:38     ` Tristan Gingold
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Sandiford @ 2011-04-26  8:19 UTC (permalink / raw)
  To: Tristan Gingold; +Cc: binutils

Hi Tristan,

Sorry to show my ignorance, but where did you get these macro
definitions from?  I only have access to the public documentation
and can't find definitions for some of these.

I trust you that they're correct.  The reason I held back was that
I was worried about copyright issues if the patch was a bulk copy of
macros from the AIX header files.

Richard

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

* Re: Ping [Patch] include/coff/xcoff.h: add new macros
  2011-04-26  8:19   ` Richard Sandiford
@ 2011-04-26  8:38     ` Tristan Gingold
  2011-04-27  9:56       ` Nick Clifton
  0 siblings, 1 reply; 6+ messages in thread
From: Tristan Gingold @ 2011-04-26  8:38 UTC (permalink / raw)
  To: Richard Sandiford; +Cc: binutils


On Apr 26, 2011, at 10:19 AM, Richard Sandiford wrote:

> Hi Tristan,
> 
> Sorry to show my ignorance, but where did you get these macro
> definitions from?  I only have access to the public documentation
> and can't find definitions for some of these.

Note that I only have access to AIX 5.2 and 5.3.  Most of the macros are from public doc:

http://publib.boulder.ibm.com/infocenter/aix/v7r1/index.jsp?topic=/com.ibm.aix.files/doc/aixfiles/XCOFF.htm

It looks like I indeed get the definitions of:

+ /* Executable requires large pages for text.  */
+ #define F_LPTEXT    0x0400
+ 
+ /* Executable requires large pages for data.  */
+ #define F_LPDATA    0x0800
+ 
+ /* Archive member ignored by the linker.  */
+ #define F_LOADONLY  0x4000
+ 
+ /* Read/write sections are non-executable.  */
+ #define F_NONEXEC   0x8000
+ 

directly from the AIX headers.  But F_LPDATA is mentioned in AIX 6.1 doc for ld, so is F_LOADONLY in strip command.

F_NONEXEC is documented in:

http://www.ibm.com/developerworks/aix/library/au-appdev-aix5l.html

So only F_LPTEXT doesn't appear in IBM doc, but it appears in Valgrind code.

> I trust you that they're correct.  The reason I held back was that
> I was worried about copyright issues if the patch was a bulk copy of
> macros from the AIX header files.

I can remove these macros as they aren't yet used in binutils.  Tell me what do you prefer.

Tristan.

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

* Re: Ping [Patch] include/coff/xcoff.h: add new macros
  2011-04-26  8:38     ` Tristan Gingold
@ 2011-04-27  9:56       ` Nick Clifton
  2011-04-27 15:04         ` Tristan Gingold
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Clifton @ 2011-04-27  9:56 UTC (permalink / raw)
  To: Tristan Gingold; +Cc: Richard Sandiford, binutils

Hi Tristan,

> It looks like I indeed get the definitions of:
>
> + #define F_LPTEXT    0x0400
> + #define F_LPDATA    0x0800
> + #define F_LOADONLY  0x4000
> + #define F_NONEXEC   0x8000
>
> directly from the AIX headers.  But F_LPDATA is mentioned in AIX 6.1 doc for ld, so is F_LOADONLY in strip command.
>
> F_NONEXEC is documented in:
>
> http://www.ibm.com/developerworks/aix/library/au-appdev-aix5l.html
>
> So only F_LPTEXT doesn't appear in IBM doc, but it appears in Valgrind code.
>
>> I trust you that they're correct.  The reason I held back was that
>> I was worried about copyright issues if the patch was a bulk copy of
>> macros from the AIX header files.
>
> I can remove these macros as they aren't yet used in binutils.  Tell me what do you prefer.

I think that it would be best to remove them.  If they are not needed 
and we cannot be sure of their copyright status, then lets leave them 
out.  A patch with this change is pre-approved.

Cheers
   Nick


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

* Re: Ping [Patch] include/coff/xcoff.h: add new macros
  2011-04-27  9:56       ` Nick Clifton
@ 2011-04-27 15:04         ` Tristan Gingold
  0 siblings, 0 replies; 6+ messages in thread
From: Tristan Gingold @ 2011-04-27 15:04 UTC (permalink / raw)
  To: Nick Clifton; +Cc: Richard Sandiford, binutils


On Apr 27, 2011, at 11:56 AM, Nick Clifton wrote:

> Hi Tristan,
> 
>> It looks like I indeed get the definitions of:
>> 
>> + #define F_LPTEXT    0x0400
>> + #define F_LPDATA    0x0800
>> + #define F_LOADONLY  0x4000
>> + #define F_NONEXEC   0x8000
>> 
>> directly from the AIX headers.  But F_LPDATA is mentioned in AIX 6.1 doc for ld, so is F_LOADONLY in strip command.
>> 
>> F_NONEXEC is documented in:
>> 
>> http://www.ibm.com/developerworks/aix/library/au-appdev-aix5l.html
>> 
>> So only F_LPTEXT doesn't appear in IBM doc, but it appears in Valgrind code.
>> 
>>> I trust you that they're correct.  The reason I held back was that
>>> I was worried about copyright issues if the patch was a bulk copy of
>>> macros from the AIX header files.
>> 
>> I can remove these macros as they aren't yet used in binutils.  Tell me what do you prefer.
> 
> I think that it would be best to remove them.  If they are not needed and we cannot be sure of their copyright status, then lets leave them out.  A patch with this change is pre-approved.

Ok, committed.

Tristan.

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

end of thread, other threads:[~2011-04-27 15:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-18 14:28 [Patch] include/coff/xcoff.h: add new macros Tristan Gingold
2011-04-26  7:43 ` Ping " Tristan Gingold
2011-04-26  8:19   ` Richard Sandiford
2011-04-26  8:38     ` Tristan Gingold
2011-04-27  9:56       ` Nick Clifton
2011-04-27 15:04         ` Tristan Gingold

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).