This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Unique section ids
- To: Nick Clifton <nickc at cygnus dot com>
- Subject: Re: Unique section ids
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Sat, 8 Jul 2000 22:16:14 +1000 (EST)
- cc: law at cygnus dot com, binutils at sourceware dot cygnus dot com
On Thu, 6 Jul 2000, Nick Clifton wrote:
> Sequence IDs seem to be the simpler solution overall, so lets go with
> that. Alan - I assume that you will submit a full blown patch ?
Yeah, I'd better make it clear in future when I'm posting something
half-baked for discussion :-) This additional hunk is needed for
initialisation of the four default sections.
@@ -551,8 +552,8 @@ static const asymbol global_syms[] =
#define STD_SECTION(SEC, FLAGS, SYM, NAME, IDX) \
const asymbol * const SYM = (asymbol *) &global_syms[IDX]; \
const asection SEC = \
- /* name, index, next, flags, set_vma, reloc_done, linker_mark, gc_mark */ \
- { NAME, 0, NULL, FLAGS, 0, 0, 0, 0, \
+ /* name, id, index, next, flags, set_vma, reloc_done, linker_mark, gc_mark */ \
+ { NAME, -1-(IDX), 0, NULL, FLAGS, 0, 0, 0, 0, \
\
/* vma, lma, _cooked_size, _raw_size, output_offset, output_section, */ \
0, 0, 0, 0, 0, (struct sec *) &SEC, \
except that the patch I actually checked in reformatted this macro (and
quite a few other things too, since we seem to be in tidy-up mode). I
won't bother posting the full patch to the list as it's mainly white-space
changes. The substantive changes are the above hunk with the patch I
previously posted, and the patch to bfd/doc/chew.c below.
bfd/ChangeLog
* section.c (struct sec): Add id field. Tidy comment formatting.
(bfd_make_section_anyway): Set id.
(STD_SECTION): Init id too.
Change CONST to const throughout.
* archures.c (bfd_arch_info): Tidy comment.
(bfd_arch_list): Change a CONST to const.
* libbfd-in.h: Tidy comments and replace CONST with const.
* elf-bfd.h: Likewise.
* libbfd.h: Regenerate.
* bfd-in2.h: Regenerate.
* libcoff.h: Regenerate.
This one fixes a long-standing problem with "make headers" that messed up
comments in bfd-in2.h and other generated files.
bfd/doc/ChangeLog
* chew.c (outputdots): Don't add a space before `/*'.
(courierize): Likewise.
Regards, Alan Modra
--
Linuxcare. Support for the Revolution.
Index: bfd/doc/chew.c
===================================================================
RCS file: /cvs/src/src/bfd/doc/chew.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 chew.c
--- chew.c 1999/05/03 07:28:58 1.1.1.1
+++ chew.c 2000/07/08 03:29:18
@@ -1,5 +1,5 @@
/* chew
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1998
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1998, 2000
Free Software Foundation, Inc.
Contributed by steve chamberlain @cygnus
@@ -634,7 +634,7 @@ DEFUN_VOID(outputdots)
{
if (c == '{' && at(tos,idx+1) =='*')
{
- cattext(&out," /*");
+ cattext(&out,"/*");
idx+=2;
}
else if (c == '*' && at(tos,idx+1) =='}')
@@ -685,7 +685,7 @@ WORD(courierize)
{
if (at(tos,idx)=='{' && at(tos,idx+1) =='*')
{
- cattext(&out," /*");
+ cattext(&out,"/*");
idx+=2;
}
else if (at(tos,idx)=='*' && at(tos,idx+1) =='}')