This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
New .section Flag
- To: binutils at sourceware dot cygnus dot com
- Subject: New .section Flag
- From: Tracy Kuhrt <Tracy dot Kuhrt at microchip dot com>
- Date: Thu, 30 Aug 2001 16:11:34 -0700
I would like to add an additional flag to the .section directive for
COFF that would allow the user to specify that they want this section to
be blocked. Following is a patch for this change.
@@ -1410,6 +1410,7 @@ coff_frob_file_after_relocs ()
* 'x' for text
* 'r' for read-only data
* 's' for shared data
(PE)
+ * 'k' for blocked
* But if the argument is not a quoted string, treat it as a
* subsegment number.
*/
@@ -1468,6 +1469,9 @@ obj_coff_section (ignore)
case 'x': flags |= SEC_CODE | SEC_LOAD; break;
case 'r': flags |= SEC_READONLY; break;
case 's': flags |= SEC_SHARED; break;
+#ifdef STYP_BLOCK
+ case 'k': flags |= SEC_BLOCK; break;
+#endif
case 'i': /* STYP_INFO */
case 'l': /* STYP_LIB */
It appears that the TI c54x port is the only port that currently uses
section blocking.
I am also interested in fixing the following from
ldlang.c::lang_add_section to obtain this value from bfd.
/* FIXME: This value should really be obtained from the
bfd... */
output->block_value = 128;
Does this value already exist somewhere or would it need to be added? I
could not see where this existed and thought it should be added to the
bfd_arch_info_type structure. Any thoughts?
Tracy