* revised patch for COFF section attr default
@ 2000-07-05 21:15 Mark E.
0 siblings, 0 replies; 2+ messages in thread
From: Mark E. @ 2000-07-05 21:15 UTC (permalink / raw)
To: binutils
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: revised patch for COFF section attr default
@ 2000-07-06 10:19 Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2000-07-06 10:19 UTC (permalink / raw)
To: snowball3; +Cc: binutils
Hi Mark,
: 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.
:
: 2000-07-06 Mark Elbrecht <snowball3@bigfoot.com>
:
: * doc/internals.texi (CPU Backend): Describe
: TC_COFF_SECTION_DEFAULT_ATTRIBUTES.
Approved and applied.
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-07-06 10:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-05 21:15 revised patch for COFF section attr default Mark E.
2000-07-06 10:19 Nick Clifton
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).