This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH/RFC] Map .coment/.note to BSD/POSIX symbol types
- From: Elias Athanasopoulos <elathan at phys dot uoa dot gr>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 3 Jun 2003 19:38:04 +0300
- Subject: Re: [PATCH/RFC] Map .coment/.note to BSD/POSIX symbol types
- References: <20030523183235.C7065@neutrino.particles.org> <m3d6i9y6k0.fsf@gossamer.airs.com> <20030601225357.G7065@neutrino.particles.org> <m3adczkzei.fsf@redhat.com>
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.