aboutsummaryrefslogtreecommitdiff
path: root/bfd/seclet.c
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1992-08-27 00:35:09 +0000
committerSteve Chamberlain <sac@cygnus>1992-08-27 00:35:09 +0000
commit3be56062313b092e65b8e99d79469f165d5d9b1a (patch)
tree090043380f08e421bf9ee58fc4357ace8fa8a61f /bfd/seclet.c
parentcd1d8c6d89ab6b17bf5b9b0a4659e1e1209e0d48 (diff)
downloadgdb-3be56062313b092e65b8e99d79469f165d5d9b1a.zip
gdb-3be56062313b092e65b8e99d79469f165d5d9b1a.tar.gz
gdb-3be56062313b092e65b8e99d79469f165d5d9b1a.tar.bz2
* bout.c: added support for relaxable alignment relocs.
* seclet.c (rel, seclet_dump_seclet, seclet_dump): get the app to pass down pointer to play area rather than use alloca
Diffstat (limited to 'bfd/seclet.c')
-rw-r--r--bfd/seclet.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/bfd/seclet.c b/bfd/seclet.c
index e7fb65c..685653f 100644
--- a/bfd/seclet.c
+++ b/bfd/seclet.c
@@ -52,17 +52,17 @@ extern bfd_error_vector_type bfd_error_vector;
void
-DEFUN(rel,(abfd, seclet, output_section),
+DEFUN(rel,(abfd, seclet, output_section, data),
bfd *abfd AND
bfd_seclet_type *seclet AND
- asection *output_section)
+ asection *output_section AND
+ PTR data)
{
if (output_section->flags & SEC_HAS_CONTENTS
&& !(output_section->flags & SEC_NEVER_LOAD)
&& seclet->size)
{
- bfd_byte *data = (bfd_byte *)alloca(seclet->size);
data = bfd_get_relocated_section_contents(abfd, seclet, data);
if(bfd_set_section_contents(abfd,
output_section,
@@ -72,22 +72,22 @@ DEFUN(rel,(abfd, seclet, output_section),
{
abort();
}
-
}
}
void
-DEFUN(seclet_dump_seclet,(abfd, seclet, section),
+DEFUN(seclet_dump_seclet,(abfd, seclet, section, data),
bfd *abfd AND
bfd_seclet_type *seclet AND
- asection *section)
+ asection *section AND
+ PTR data)
{
switch (seclet->type)
{
case bfd_indirect_seclet:
/* The contents of this section come from another one somewhere
else */
- rel(abfd, seclet, section);
+ rel(abfd, seclet, section, data);
break;
case bfd_fill_seclet:
/* Fill in the section with us */
@@ -110,8 +110,9 @@ DEFUN(seclet_dump_seclet,(abfd, seclet, section),
}
void
-DEFUN(seclet_dump,(abfd),
- bfd *abfd)
+DEFUN(seclet_dump,(abfd, data),
+ bfd *abfd AND
+ PTR data)
{
/* Write all the seclets on the bfd out, relocate etc according to the
rules */
@@ -122,7 +123,7 @@ DEFUN(seclet_dump,(abfd),
bfd_seclet_type *p = o->seclets_head;
while (p != (bfd_seclet_type *)NULL)
{
- seclet_dump_seclet(abfd, p, o);
+ seclet_dump_seclet(abfd, p, o, data);
p = p ->next;
}
o = o->next;