diff options
author | Steve Chamberlain <sac@cygnus> | 1992-04-17 16:22:44 +0000 |
---|---|---|
committer | Steve Chamberlain <sac@cygnus> | 1992-04-17 16:22:44 +0000 |
commit | e59320117ef2161f271698ede38593710bfe77f1 (patch) | |
tree | e2a38d4d9a0aacdcbbf81d349dbdcf344148c401 /bfd/seclet.c | |
parent | 267998d84ff3c8eeb3dab12984adffc7f3cadeee (diff) | |
download | gdb-e59320117ef2161f271698ede38593710bfe77f1.zip gdb-e59320117ef2161f271698ede38593710bfe77f1.tar.gz gdb-e59320117ef2161f271698ede38593710bfe77f1.tar.bz2 |
Fri Apr 17 09:15:31 1992 Steve Chamberlain (sac@thepub.cygnus.com)
* bfd.c, Makefile.in: added tekhex
* aoutx.h (set_section_contents): pages should be padded to the
size of a page, not the size of a segment.
* configure.in: added go32 host and i386-aout target.
* i386aout.c, libaout.h: now works for go32 target
* ieee.c: fix bit rot.
* seclet.c: support for padding seclet type.
Diffstat (limited to 'bfd/seclet.c')
-rw-r--r-- | bfd/seclet.c | 55 |
1 files changed, 26 insertions, 29 deletions
diff --git a/bfd/seclet.c b/bfd/seclet.c index 8deef00..e030488 100644 --- a/bfd/seclet.c +++ b/bfd/seclet.c @@ -42,7 +42,6 @@ DEFUN(bfd_new_seclet,(abfd, section), section->seclets_tail = n; return n; - } @@ -61,24 +60,16 @@ DEFUN(rel,(abfd, seclet, output_section), bfd_byte *data; if (output_section->flags & SEC_HAS_CONTENTS ) { - - data = bfd_get_relocated_section_contents(abfd, seclet); - - if(bfd_set_section_contents(abfd, - output_section, - data, - seclet->offset, - seclet->size) == false) - { - abort(); + data = bfd_get_relocated_section_contents(abfd, seclet); + if(bfd_set_section_contents(abfd, + output_section, + data, + seclet->offset, + seclet->size) == false) + { + abort(); + } } - -} - - - - - } void @@ -89,21 +80,29 @@ DEFUN(seclet_dump_seclet,(abfd, seclet, section), { switch (seclet->type) { - - case bfd_indirect_seclet: + case bfd_indirect_seclet: /* The contents of this section come from another one somewhere else */ rel(abfd, seclet, section); - - break; - - default: + case bfd_fill_seclet: + /* Fill in the section with us */ + { + char *d = malloc(seclet->size); + unsigned int i; + for (i =0; i < seclet->size; i+=2) { + d[i] = seclet->u.fill.value >> 8; + } + for (i = 1; i < seclet->size; i+=2) { + d[i] = seclet->u.fill.value ; + } + bfd_set_section_contents(abfd, section, d, seclet->offset, seclet->size); + + } + break; + default: abort(); } - - - } void @@ -122,8 +121,6 @@ DEFUN(seclet_dump,(abfd), seclet_dump_seclet(abfd, p, o); p = p ->next; } - o = o->next; } - } |