This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


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

revised patch for COFF section attr default


Hi folks,

Here is the patch that adds the macro TC_COFF_SECTION_DEFAULT_ATTRIBUTES and defaults 
it to (SEC_LOAD | SEC_DATA).

2000-07-05  Mark Elbrecht  <snowball3@bigfoot.com>

	* config/obj-coff.c (TC_COFF_SECTION_DEFAULT_ATTRIBUTES): New.
	  Default to '(SEC_LOAD | SEC_DATA)'.

	* config/obj-coff.c (obj_coff_section) [BFD_ASSEMBLER]: Use it.

Index: src/gas/config/obj-coff.c
===================================================================
RCS file: /cvs/src/src/gas/config/obj-coff.c,v
retrieving revision 1.26
diff -c -p -r1.26 obj-coff.c
*** obj-coff.c	2000/06/29 23:54:13	1.26
--- obj-coff.c	2000/07/06 04:06:12
***************
*** 30,35 ****
--- 30,42 ----
  #define KEEP_RELOC_INFO
  #endif
  
+ /* The BFD_ASSEMBLER version of obj_coff_section will use this macro to set
+    a new section's attributes when a directive has no valid flags or the
+    "w" flag is used. This default should be appropriate for most.  */
+ #ifndef TC_COFF_SECTION_DEFAULT_ATTRIBUTES
+ #define TC_COFF_SECTION_DEFAULT_ATTRIBUTES (SEC_LOAD | SEC_DATA)
+ #endif
+ 
  static void obj_coff_bss PARAMS ((int));
  const char *s_get_name PARAMS ((symbolS * s));
  static void obj_coff_ln PARAMS ((int));
*************** obj_coff_section (ignore)
*** 1426,1432 ****
        /* Set section flags for a new section just created by subseg_new.
           Provide a default if no flags were parsed.  */
        if (flags == SEC_NO_FLAGS)
!         flags = SEC_LOAD;
            
  #ifdef COFF_LONG_SECTION_NAMES
        /* Add SEC_LINK_ONCE and SEC_LINK_DUPLICATES_DISCARD to .gnu.linkonce
--- 1433,1439 ----
        /* Set section flags for a new section just created by subseg_new.
           Provide a default if no flags were parsed.  */
        if (flags == SEC_NO_FLAGS)
!         flags = TC_COFF_SECTION_DEFAULT_ATTRIBUTES;
            
  #ifdef COFF_LONG_SECTION_NAMES
        /* Add SEC_LINK_ONCE and SEC_LINK_DUPLICATES_DISCARD to .gnu.linkonce


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