diff options
author | Jeff Law <law@redhat.com> | 1994-01-13 20:17:39 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1994-01-13 20:17:39 +0000 |
commit | 86066d063bde8387f1f099fb24c9ad4caafcdf6c (patch) | |
tree | d362b48935998496114427757a0ca371c67e8b0d /gas/config/obj-som.c | |
parent | 500828a0957541ba3fad4ff5af148601062d269f (diff) | |
download | gdb-86066d063bde8387f1f099fb24c9ad4caafcdf6c.zip gdb-86066d063bde8387f1f099fb24c9ad4caafcdf6c.tar.gz gdb-86066d063bde8387f1f099fb24c9ad4caafcdf6c.tar.bz2 |
* config/obj-som.c (som_frob_file): Call adjust_code_sections
for each section.
(adjust_code_sections): New function. Adjusts the VMA for all the
$CODE$ subspaces.
* config/tc-hppa.c (md_assemble): Also handle creating a fixup
for the unwind descriptors if a function's label follows the
.PROC and .ENTRY directives.
(pa_entry): Don't set BSF_FUNCTION for the label symbol here; it
is done elsewhere. Don't create a fixup for the unwind
descriptors if the function's label has not been defined yet.
(pa_proc): For SOM, place each procedure within a new $CODE$
subspace. Adjust the segment and frag for the associated
function label if it exists.
Diffstat (limited to 'gas/config/obj-som.c')
-rw-r--r-- | gas/config/obj-som.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/gas/config/obj-som.c b/gas/config/obj-som.c index a73dad3..77f6335 100644 --- a/gas/config/obj-som.c +++ b/gas/config/obj-som.c @@ -35,6 +35,9 @@ const pseudo_typeS obj_pseudo_table[] = static int version_seen = 0; static int copyright_seen = 0; +/* Unused by SOM. */ +void obj_read_begin_hook () {} + /* Handle a .version directive. */ void @@ -203,12 +206,28 @@ adjust_stab_sections (abfd, sec, xxx) bfd_h_put_32 (abfd, (bfd_vma) strsz, (bfd_byte *) p + 8); } +/* Adjust the VMA address for each $CODE$ subspace. */ +static void +adjust_code_sections (abfd, sec, xxx) + bfd *abfd; + asection *sec; + PTR xxx; +{ + static unsigned size_so_far = 0; + + if (strcmp (sec->name, "$CODE$")) + return; + + bfd_set_section_vma (stdoutput, sec, size_so_far); + size_so_far += bfd_get_section_size_before_reloc (sec); +} + /* Called late in the asssembly phase to adjust the special - stab entry. This is where any other late object-file dependent - processing which should happen. */ + stab entry and to set the starting address for each code subspace. */ void som_frob_file () { bfd_map_over_sections (stdoutput, adjust_stab_sections, (PTR) 0); + bfd_map_over_sections (stdoutput, adjust_code_sections, (PTR) 0); } |