aboutsummaryrefslogtreecommitdiff
path: root/ld/ldsym.c
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1992-01-24 18:41:32 +0000
committerSteve Chamberlain <sac@cygnus>1992-01-24 18:41:32 +0000
commitc611e285bd68ba6f2fa2f3063a002ace9b8f626f (patch)
tree272c4535b946c99f584949cab1277279323abfa1 /ld/ldsym.c
parentf5e8a8f9c7213183a8e7a261cd74687c3dff335f (diff)
downloadgdb-c611e285bd68ba6f2fa2f3063a002ace9b8f626f.zip
gdb-c611e285bd68ba6f2fa2f3063a002ace9b8f626f.tar.gz
gdb-c611e285bd68ba6f2fa2f3063a002ace9b8f626f.tar.bz2
Merging from VMS port. Doc to follow..
Diffstat (limited to 'ld/ldsym.c')
-rw-r--r--ld/ldsym.c58
1 files changed, 36 insertions, 22 deletions
diff --git a/ld/ldsym.c b/ld/ldsym.c
index 4ad9476..5d75c69 100644
--- a/ld/ldsym.c
+++ b/ld/ldsym.c
@@ -214,32 +214,46 @@ lang_input_statement_type *f;
{
fprintf (stdout, " %s\n", f->filename);
if (f->just_syms_flag)
- {
- fprintf (stdout, " symbols only\n");
- }
+ {
+ fprintf (stdout, " symbols only\n");
+ }
else
- {
- asection *s;
- if (true || option_longmap) {
- for (s = f->the_bfd->sections;
- s != (asection *)NULL;
- s = s->next) {
+ {
+ asection *s;
+ if (true || option_longmap) {
+ for (s = f->the_bfd->sections;
+ s != (asection *)NULL;
+ s = s->next) {
print_address(s->output_offset);
- printf (" %08x 2**%2ud %s\n",
- (unsigned)s->size, s->alignment_power, s->name);
+ if (s->flags & SEC_HAS_CONTENTS)
+ {
+ printf (" %08x 2**%2ud %s\n",
+ (unsigned)bfd_get_section_size_after_reloc(s),
+ s->alignment_power, s->name);
+ }
+
+ else
+ {
+ printf (" %08x 2**%2ud %s\n",
+ (unsigned)bfd_get_section_size_before_reloc(s),
+ s->alignment_power, s->name);
+ }
+
+
+
}
- }
- else {
- for (s = f->the_bfd->sections;
- s != (asection *)NULL;
- s = s->next) {
+ }
+ else {
+ for (s = f->the_bfd->sections;
+ s != (asection *)NULL;
+ s = s->next) {
printf("%s ", s->name);
print_address(s->output_offset);
- printf("(%x)", (unsigned)s->size);
+ printf("(%x)", (unsigned)bfd_get_section_size_after_reloc(s));
}
- printf("hex \n");
- }
+ printf("hex \n");
}
+ }
fprintf (stdout, "\n");
}
@@ -345,7 +359,7 @@ LANG_FOR_EACH_INPUT_STATEMENT(entry)
{
asymbol *p = entry->asymbols[i];
- if (flag_is_global(p->flags) || flag_is_absolute(p->flags))
+ if (flag_is_global(p->flags) )
{
/* We are only interested in outputting
globals at this stage in special circumstances */
@@ -376,10 +390,10 @@ LANG_FOR_EACH_INPUT_STATEMENT(entry)
*output_buffer++ = p;
}
}
- else if (flag_is_undefined(p->flags))
+ else if (p->section == &bfd_und_section)
{ /* This must be global */
}
- else if (flag_is_common(p->flags)) {
+ else if (p->section == &bfd_com_section) {
/* And so must this */
}
else if (p->flags & BSF_CTOR) {