This is the mail archive of the binutils@sources.redhat.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]
Other format: [Raw text]

Re: [PATCH/RFC] Map .coment/.note to BSD/POSIX symbol types


Hi Nick,

On Tue, Jun 03, 2003 at 03:29:25PM +0100, Nick Clifton wrote:
> Approved - please apply.

Could you do this for be, because I don't have CVS write access?
 
> Please also update binutuls/doc/binutils.texi where it describes the
> output of the nm command.

I don't think this is necessary. The current documentation is right with
this change. The sections .comment and .note can be thought of as debugging
symbols and we use lowercase 'n' just as we do with sections such as .bss
(we mark it with lowercase 'b', not 'B').

According to the documentation lowercase characters mean local and uppercase
characters mean global symbols. If this is not the case with .comment and
.note, I suggest to change my original patch and make decode_section_type
to return 'N' for .comment/.note.

Correct me if I'm wrong in the above.

> Please also update binutils/NEWS to mention this new feature of nm.

Done.

Regards,
Elias
-- 
University of Athens			I bet the human brain 
Physics Department				is a kludge --Marvin Minsky 


bfd/ChangeLog

2003-06-03  Elias Athanasopoulos  <elathan@phys.uoa.gr>

	* syms.c (decode_section_type): Return 'n' if section flags are
 	SEC_HAS_CONTENTS && SEC_READONLY.

binutils/ChangeLog

2003-06-03  Elias Athanasopoulos  <elathan@phys.uoa.gr>

	* NEWS: Document the new BSD/POSIX single-character mapping for
	.comment/.note sections.
	
	
===================================================================
RCS file: /home/anteater/bucvs/src/bfd/syms.c,v
retrieving revision 1.1
diff -u -r1.1 /home/anteater/bucvs/src/bfd/syms.c
--- /home/anteater/bucvs/src/bfd/syms.c	2003/05/22 18:17:20	1.1
+++ /home/anteater/bucvs/src/bfd/syms.c	2003/06/01 07:44:57
@@ -619,7 +619,9 @@
     }
   if (section->flags & SEC_DEBUGGING)
     return 'N';
-
+  if ((section->flags & SEC_HAS_CONTENTS) &&
+      (section->flags & SEC_READONLY))
+    return 'n';
   return '?';
 }


===================================================================
RCS file: /home/anteater/bucvs/src/binutils/NEWS,v
retrieving revision 1.1
diff -u -r1.1 /home/anteater/bucvs/src/binutils/NEWS
--- /home/anteater/bucvs/src/binutils/NEWS	2003/06/03 16:13:44	1.1
+++ /home/anteater/bucvs/src/binutils/NEWS	2003/06/03 16:19:27
@@ -1,5 +1,9 @@
 -*- text -*-
 
+* BFD marks the sections .comment and .note as 'n' in the BSD/POSIX
+  single-character representation. This can be checked by running nm
+  with the -a switch.
+
 * Added --info switch to objcopy and strip.
 
 * Support for Vitesse IQ2000 added by Red Hat.


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