From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Mark E." To: binutils@sourceware.cygnus.com Subject: revised patch for COFF section attr default Date: Wed, 05 Jul 2000 21:15:00 -0000 Message-id: <3963CFDD.19909.2C9F0C@localhost> X-SW-Source: 2000-07/msg00067.html 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 * 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