aboutsummaryrefslogtreecommitdiff
path: root/bfd/coffcode.h
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-04-25 04:45:31 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-04-25 04:45:31 +0000
commit35d835c405569b137a0b0c26c17c04cbce4b5287 (patch)
treefd17b9e89fb80ce3bceefe2660f5a52f0dc816ed /bfd/coffcode.h
parent8cba9703cde8718f1290f4f80588f189d05527f8 (diff)
downloadgdb-35d835c405569b137a0b0c26c17c04cbce4b5287.zip
gdb-35d835c405569b137a0b0c26c17c04cbce4b5287.tar.gz
gdb-35d835c405569b137a0b0c26c17c04cbce4b5287.tar.bz2
* coffcode.h [_LIT]: Recognize .lit section.
Diffstat (limited to 'bfd/coffcode.h')
-rw-r--r--bfd/coffcode.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 9791f72..ad89efe 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -338,6 +338,12 @@ DEFUN(sec_to_styp_flags, (sec_name, sec_flags),
{
styp_flags = STYP_LIB;
#endif /* _LIB */
+#ifdef _LIT
+ }
+ else if (!strcmp (sec_name, _LIT))
+ {
+ stype_flags = STYP_LIT;
+#endif /* _LIT */
}
/* Try and figure out what it should be */
@@ -413,11 +419,16 @@ DEFUN(styp_to_sec_flags, (abfd, hdr),
}
else if (styp_flags & STYP_BSS)
{
- sec_flags |= SEC_ALLOC;
+#ifdef BSS_NOLOAD_IS_SHARED_LIBRARY
+ if (sec_flags & SEC_NEVER_LOAD)
+ sec_flags |= SEC_ALLOC | SEC_SHARED_LIBRARY;
+ else
+#endif
+ sec_flags |= SEC_ALLOC;
}
else if (styp_flags & STYP_INFO)
{
- sec_flags |= SEC_NEVER_LOAD;
+ /* Nothing to do. */
}
else
{
@@ -1226,6 +1237,14 @@ DEFUN(coff_compute_section_file_positions,(abfd),
current->_raw_size += sofar - old_sofar ;
#endif
+#ifdef _LIB
+ /* Force .lib sections to start at zero. The vma is then
+ incremented in coff_set_section_contents. This is right for
+ SVR3.2. */
+ if (strcmp (current->name, _LIB) == 0)
+ bfd_set_section_vma (abfd, current, 0);
+#endif
+
previous = current;
}
obj_relocbase(abfd) = sofar;
@@ -1637,7 +1656,7 @@ DEFUN(coff_set_section_contents,(abfd, section, location, offset, count),
right for SVR3.2. Shared libraries should probably get more
generic support. Ian Taylor <ian@cygnus.com>. */
if (strcmp (section->name, _LIB) == 0)
- ++section->vma;
+ ++section->lma;
#endif
/* Don't write out bss sections - one way to do this is to