aboutsummaryrefslogtreecommitdiff
path: root/bfd/coffcode.h
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>1996-05-02 02:41:20 +0000
committerDavid Edelsohn <dje.gcc@gmail.com>1996-05-02 02:41:20 +0000
commit9c7a5748032251fd306e41010bea9c1ec5e19962 (patch)
tree9dd6f6f09b4d7832c2ae0a6ff9133c87dd875441 /bfd/coffcode.h
parent7681eb9df7f4c5e9b057c9c2e168a973b728536b (diff)
downloadgdb-9c7a5748032251fd306e41010bea9c1ec5e19962.zip
gdb-9c7a5748032251fd306e41010bea9c1ec5e19962.tar.gz
gdb-9c7a5748032251fd306e41010bea9c1ec5e19962.tar.bz2
* coffcode.h (coff_write_object_contents): In comdat section lookup,
stop looking when section is found.
Diffstat (limited to 'bfd/coffcode.h')
-rw-r--r--bfd/coffcode.h35
1 files changed, 21 insertions, 14 deletions
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 520d048..2c716f6 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -2471,28 +2471,35 @@ coff_write_object_contents (abfd)
{
unsigned int i, count;
asymbol **psym;
+ coff_symbol_type *csym;
count = bfd_get_symcount (abfd);
for (i = 0, psym = abfd->outsymbols; i < count; i++, psym++)
{
- coff_symbol_type *csym;
- combined_entry_type *aux;
-
- if (strcmp ((*psym)->name, current->name) != 0)
- continue;
+ /* Here *PSYM is the section symbol for CURRENT. */
- csym = coff_symbol_from (abfd, *psym);
- if (csym == NULL
- || csym->native == NULL
- || csym->native->u.syment.n_numaux < 1
- || csym->native->u.syment.n_sclass != C_STAT
- || csym->native->u.syment.n_type != T_NULL)
- continue;
+ if (strcmp ((*psym)->name, current->name) == 0)
+ {
+ csym = coff_symbol_from (abfd, *psym);
+ if (csym == NULL
+ || csym->native == NULL
+ || csym->native->u.syment.n_numaux < 1
+ || csym->native->u.syment.n_sclass != C_STAT
+ || csym->native->u.syment.n_type != T_NULL)
+ continue;
+ break;
+ }
+ }
- /* Here *PSYM is the section symbol for CURRENT. */
+ /* Did we find it?
+ Note that we might not if we're converting the file from
+ some other object file format. */
+ if (i < count)
+ {
+ combined_entry_type *aux;
/* We don't touch the x_checksum field. The
- x_associated field is not currently supported. */
+ x_associated field is not currently supported. */
aux = csym->native + 1;
switch (current->flags & SEC_LINK_DUPLICATES)