mirror of
https://github.com/bebbo/amigaos-binutils-2.14.git
synced 2025-12-08 22:38:24 +00:00
@M added devel1 modifications to starting base
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>amigaos-binutils-2.14</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
+1
-1
@@ -204,7 +204,7 @@ USUAL_MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
|
||||
# sub-makes. It lets flags be given on the command line while still
|
||||
# using the makeinfo from the object tree.
|
||||
# (Default to avoid splitting info files.)
|
||||
MAKEINFOFLAGS = --no-split
|
||||
MAKEINFOFLAGS = --no-split --force
|
||||
|
||||
EXPECT = `if [ -f $$r/expect/expect ] ; \
|
||||
then echo $$r/expect/expect ; \
|
||||
|
||||
+1
-1
@@ -207,7 +207,7 @@ USUAL_MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
|
||||
# sub-makes. It lets flags be given on the command line while still
|
||||
# using the makeinfo from the object tree.
|
||||
# (Default to avoid splitting info files.)
|
||||
MAKEINFOFLAGS = --no-split
|
||||
MAKEINFOFLAGS = --no-split --force
|
||||
|
||||
EXPECT = `if [ -f $$r/expect/expect ] ; \
|
||||
then echo $$r/expect/expect ; \
|
||||
|
||||
@@ -117,6 +117,7 @@ BFD:
|
||||
rewrite of the disassemble functions.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "bfd.h"
|
||||
#include "sysdep.h"
|
||||
#include "libbfd.h"
|
||||
|
||||
+11
-6
@@ -409,9 +409,9 @@ amiga_perform_reloc (abfd, r, data, sec, obfd, error_message)
|
||||
|
||||
sym=*(r->sym_ptr_ptr);
|
||||
|
||||
/* FIXME: XXX */
|
||||
if (0 && sym->udata.p)
|
||||
sym = ((struct generic_link_hash_entry *) sym->udata.p)->sym;
|
||||
// SBF: no idea what to fix here...?? /* FIXME: XXX */
|
||||
// if (0 && sym->udata.p)
|
||||
// sym = ((struct generic_link_hash_entry *) sym->udata.p)->sym;
|
||||
|
||||
target_section=sym->section;
|
||||
|
||||
@@ -609,7 +609,12 @@ aout_perform_reloc (abfd, r, data, sec, obfd, error_message)
|
||||
}
|
||||
else if (sec->output_section!=target_section->output_section)
|
||||
{
|
||||
if ((target_section->output_section->flags&SEC_DATA)!=0)
|
||||
// SBF: the if statement has been fixed, but the linker does no longer work.
|
||||
// if ((target_section->output_section->flags&SEC_DATA)!=0)
|
||||
// I replaced it with the old (obvious bogus) statement
|
||||
// TODO: a better fix?
|
||||
//if (target_section->output_section->flags & (SEC_DATA != 0))
|
||||
if (amiga_base_relative)
|
||||
goto baserel; /* Dirty, but no code duplication.. */
|
||||
bfd_msg ("pc relative relocation out-of-range in section %s. "
|
||||
"Relocation was to symbol %s",sec->name,sym->name);
|
||||
@@ -624,7 +629,7 @@ aout_perform_reloc (abfd, r, data, sec, obfd, error_message)
|
||||
{
|
||||
/* Same section, this is a pc relative hunk... */
|
||||
DPRINT(5,("Reloc to same section...\n"));
|
||||
relocation=-(r->address+sec->output_offset);
|
||||
relocation=-(long)(r->address+sec->output_offset);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -700,7 +705,7 @@ aout_perform_reloc (abfd, r, data, sec, obfd, error_message)
|
||||
- (AMIGA_DATA(target_section->output_section->owner))->a4init;
|
||||
/* if the symbol is in .bss, subtract the offset that gas has put
|
||||
into the opcode */
|
||||
if (target_section->index == 2)
|
||||
if (target_section->index == 2 && sym->flags != 2)
|
||||
relocation -= adata(abfd).datasec->_raw_size;
|
||||
DPRINT(20,("symbol=%s (0x%lx)\nsection %s (0x%lx; %s; output=0x%lx)"
|
||||
"\nrelocation @0x%lx\n", sym->name, sym->value,
|
||||
|
||||
@@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#define TARGETNAME "a.out-amiga"
|
||||
#define MACHTYPE_OK(m) ((m)==M_UNKNOWN || (m)==M_68010 || (m)==M_68020)
|
||||
#define TARGET_IS_BIG_ENDIAN_P
|
||||
|
||||
+3
-2
@@ -118,6 +118,7 @@ DESCRIPTION
|
||||
|
||||
#define KEEPIT udata.i
|
||||
|
||||
#include "config.h"
|
||||
#include "bfd.h"
|
||||
#include "sysdep.h"
|
||||
#include "safe-ctype.h"
|
||||
@@ -998,7 +999,7 @@ adjust_z_magic (abfd, execp)
|
||||
text_pad = ((obj_textsec (abfd)->filepos - obj_textsec (abfd)->vma)
|
||||
& (adata (abfd).page_size - 1));
|
||||
else
|
||||
text_pad = ((- obj_textsec (abfd)->vma)
|
||||
text_pad = ((- (signed)obj_textsec (abfd)->vma)
|
||||
& (adata (abfd).page_size - 1));
|
||||
}
|
||||
|
||||
@@ -4727,7 +4728,7 @@ aout_link_write_other_symbol (h, data)
|
||||
H_PUT_16 (output_bfd, 0, outsym.e_desc);
|
||||
indx = add_to_stringtab (output_bfd, finfo->strtab, h->root.root.string,
|
||||
FALSE);
|
||||
if (indx == - (bfd_size_type) 1)
|
||||
if (indx == (bfd_size_type) -1)
|
||||
{
|
||||
/* FIXME: No way to handle errors. */
|
||||
abort ();
|
||||
|
||||
@@ -127,6 +127,7 @@ DESCRIPTION
|
||||
" 18 " - Long name 18 characters long, extended pseudo-BSD.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "bfd.h"
|
||||
#include "sysdep.h"
|
||||
#include "libbfd.h"
|
||||
|
||||
@@ -32,6 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
the file. objcopy cooperates by specially setting the start
|
||||
address to zero by default. */
|
||||
|
||||
#include "config.h"
|
||||
#include "bfd.h"
|
||||
#include "sysdep.h"
|
||||
#include "safe-ctype.h"
|
||||
|
||||
Vendored
+1
-1
@@ -3249,7 +3249,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE=bfd
|
||||
VERSION=2.14
|
||||
VERSION=2.14a
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ AC_INIT(libbfd.c)
|
||||
AC_CANONICAL_SYSTEM
|
||||
AC_ISC_POSIX
|
||||
|
||||
AM_INIT_AUTOMAKE(bfd, 2.14)
|
||||
AM_INIT_AUTOMAKE(bfd, 2.14a)
|
||||
# Uncomment the next line to remove the date from the reported bfd version
|
||||
#is_release=y
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ SECTION
|
||||
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "bfd.h"
|
||||
#include "sysdep.h"
|
||||
#include "libbfd.h"
|
||||
|
||||
+4
-3
@@ -119,6 +119,7 @@ The MRI compiler uses this, which is a repeat of type 5:
|
||||
20..21 Carriage return, line feed
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "bfd.h"
|
||||
#include "sysdep.h"
|
||||
#include "libbfd.h"
|
||||
@@ -366,12 +367,12 @@ ihex_scan (abfd)
|
||||
chksum = len + addr + (addr >> 8) + type;
|
||||
for (i = 0; i < len; i++)
|
||||
chksum += HEX2 (buf + 2 * i);
|
||||
if (((- chksum) & 0xff) != (unsigned int) HEX2 (buf + 2 * i))
|
||||
if (((- (int)chksum) & 0xff) != (unsigned int) HEX2 (buf + 2 * i))
|
||||
{
|
||||
(*_bfd_error_handler)
|
||||
(_("%s:%u: bad checksum in Intel Hex file (expected %u, found %u)"),
|
||||
bfd_archive_filename (abfd), lineno,
|
||||
(- chksum) & 0xff, (unsigned int) HEX2 (buf + 2 * i));
|
||||
(- (int)chksum) & 0xff, (unsigned int) HEX2 (buf + 2 * i));
|
||||
bfd_set_error (bfd_error_bad_value);
|
||||
goto error_return;
|
||||
}
|
||||
@@ -788,7 +789,7 @@ ihex_write_record (abfd, count, addr, type, data)
|
||||
chksum += *data;
|
||||
}
|
||||
|
||||
TOHEX (p, (- chksum) & 0xff);
|
||||
TOHEX (p, (- (int)chksum) & 0xff);
|
||||
p[2] = '\r';
|
||||
p[3] = '\n';
|
||||
|
||||
|
||||
+10
-5
@@ -1621,14 +1621,19 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value,
|
||||
break;
|
||||
|
||||
case CDEF:
|
||||
{
|
||||
/* We have found a definition for a symbol which was
|
||||
previously common. */
|
||||
BFD_ASSERT (h->type == bfd_link_hash_common);
|
||||
if (! ((*info->callbacks->multiple_common)
|
||||
(info, h->root.string,
|
||||
h->u.c.p->section->owner, bfd_link_hash_common, h->u.c.size,
|
||||
abfd, bfd_link_hash_defined, (bfd_vma) 0)))
|
||||
int rr = ((*info->callbacks->multiple_common)
|
||||
(info, h->root.string,
|
||||
h->u.c.p->section->owner, bfd_link_hash_common, h->u.c.size,
|
||||
abfd, bfd_link_hash_defined, (bfd_vma)0));
|
||||
BFD_ASSERT(h->type == bfd_link_hash_common);
|
||||
if (!rr)
|
||||
return FALSE;
|
||||
if (rr == 2) /* ignore duplicate symbol */
|
||||
break;
|
||||
}
|
||||
/* Fall through. */
|
||||
case DEF:
|
||||
case DEFW:
|
||||
|
||||
+4
-4
@@ -916,7 +916,7 @@ space consuming. For each target:
|
||||
case -2:
|
||||
{
|
||||
long x = bfd_get_32 (abfd, (bfd_byte *) data + octets);
|
||||
relocation = -relocation;
|
||||
relocation = -(long)relocation;
|
||||
DOIT (x);
|
||||
bfd_put_32 (abfd, (bfd_vma) x, (bfd_byte *) data + octets);
|
||||
}
|
||||
@@ -925,7 +925,7 @@ space consuming. For each target:
|
||||
case -1:
|
||||
{
|
||||
long x = bfd_get_16 (abfd, (bfd_byte *) data + octets);
|
||||
relocation = -relocation;
|
||||
relocation = -(long)relocation;
|
||||
DOIT (x);
|
||||
bfd_put_16 (abfd, (bfd_vma) x, (bfd_byte *) data + octets);
|
||||
}
|
||||
@@ -1300,7 +1300,7 @@ space consuming. For each target:
|
||||
case -2:
|
||||
{
|
||||
long x = bfd_get_32 (abfd, (bfd_byte *) data);
|
||||
relocation = -relocation;
|
||||
relocation = -(long)relocation;
|
||||
DOIT (x);
|
||||
bfd_put_32 (abfd, (bfd_vma) x, (bfd_byte *) data);
|
||||
}
|
||||
@@ -1409,7 +1409,7 @@ _bfd_relocate_contents (howto, input_bfd, relocation, location)
|
||||
/* If the size is negative, negate RELOCATION. This isn't very
|
||||
general. */
|
||||
if (howto->size < 0)
|
||||
relocation = -relocation;
|
||||
relocation = -(long)relocation;
|
||||
|
||||
/* Get the value we are going to relocate. */
|
||||
size = bfd_get_reloc_size (howto);
|
||||
|
||||
@@ -104,6 +104,7 @@ DESCRIPTION
|
||||
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "bfd.h"
|
||||
#include "sysdep.h"
|
||||
#include "libbfd.h"
|
||||
|
||||
@@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "config.h"
|
||||
#include "bfd.h"
|
||||
|
||||
#define ARCH_SIZE 32 /* Value doesn't matter. */
|
||||
|
||||
@@ -67,6 +67,7 @@ The data can come out of order, and may be discontigous. This is a
|
||||
serial protocol, so big files are unlikely, so we keep a list of 8k chunks
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "bfd.h"
|
||||
#include "sysdep.h"
|
||||
#include "libbfd.h"
|
||||
|
||||
+2
-1
@@ -26,6 +26,7 @@
|
||||
when name truncated. No way to specify pos_end. Error messages should be
|
||||
more consistant. */
|
||||
|
||||
#include "config.h"
|
||||
#include "bfd.h"
|
||||
#include "libiberty.h"
|
||||
#include "progress.h"
|
||||
@@ -351,7 +352,7 @@ static FILE *output_file = NULL;
|
||||
static bfd *output_bfd = NULL;
|
||||
|
||||
static void
|
||||
remove_output ()
|
||||
remove_output (void)
|
||||
{
|
||||
if (output_filename != NULL)
|
||||
{
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <config.h>
|
||||
|
||||
/* end standard C headers. */
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
*/
|
||||
#define DONTDECLARE_MALLOC
|
||||
#include "config.h"
|
||||
#include "bfd.h"
|
||||
#include "bucomm.h"
|
||||
#include "arsup.h"
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
This file looks after requests from arparse.y, to provide the MRI
|
||||
style librarian command syntax + 1 word LIST. */
|
||||
|
||||
#include "config.h"
|
||||
#include "bfd.h"
|
||||
#include "arsup.h"
|
||||
#include "libiberty.h"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "config.h"
|
||||
#include "binemul.h"
|
||||
|
||||
extern bin_emulation_xfer_type bin_dummy_emulation;
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
/* We might put this in a library someday so it could be dynamically
|
||||
loaded, but for now it's not necessary. */
|
||||
|
||||
#include "config.h"
|
||||
#include "bfd.h"
|
||||
#include "bfdver.h"
|
||||
#include "libiberty.h"
|
||||
@@ -34,9 +35,11 @@
|
||||
|
||||
#ifndef HAVE_TIME_T_IN_TIME_H
|
||||
#ifndef HAVE_TIME_T_IN_TYPES_H
|
||||
#ifndef _TIME_T_DEFINED
|
||||
typedef long time_t;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static const char * endian_string PARAMS ((enum bfd_endian));
|
||||
static int display_target_list PARAMS ((void));
|
||||
|
||||
+2
-1
@@ -21,6 +21,7 @@
|
||||
|
||||
/* This file reads and writes IEEE-695 debugging information. */
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
@@ -3354,7 +3355,7 @@ ieee_read_reference (info, pp)
|
||||
{
|
||||
const bfd_byte *start;
|
||||
bfd_vma flags;
|
||||
const char *class, *name;
|
||||
const char *class = 0, *name;
|
||||
unsigned long classlen, namlen;
|
||||
debug_type *pslot;
|
||||
debug_type target;
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "config.h"
|
||||
#include "bfd.h"
|
||||
#include "bfdver.h"
|
||||
#include "progress.h"
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
/* This file prints out the generic debugging information, by
|
||||
supplying a set of routines to debug_write. */
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA. */
|
||||
|
||||
#include "config.h"
|
||||
#include "bfd.h"
|
||||
#include "bucomm.h"
|
||||
|
||||
|
||||
+6
-5
@@ -25,6 +25,7 @@
|
||||
code. The job it does is somewhat different, because it is not
|
||||
trying to identify the correct address for anything. */
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include "bfd.h"
|
||||
@@ -333,7 +334,7 @@ parse_number (pp, poverflow)
|
||||
if (! overflow)
|
||||
{
|
||||
if (neg)
|
||||
v = - v;
|
||||
v = - (signed)v;
|
||||
return v;
|
||||
}
|
||||
}
|
||||
@@ -4170,7 +4171,7 @@ stab_demangle_qualified (minfo, pp, ptype)
|
||||
++*pp;
|
||||
if (**pp == 't')
|
||||
{
|
||||
char *name;
|
||||
char *name = 0;
|
||||
|
||||
if (! stab_demangle_template (minfo, pp,
|
||||
ptype != NULL ? &name : NULL))
|
||||
@@ -4627,7 +4628,7 @@ stab_demangle_arg (minfo, pp, pargs, pcount, palloc)
|
||||
unsigned int *palloc;
|
||||
{
|
||||
const char *start;
|
||||
debug_type type;
|
||||
debug_type type = 0;
|
||||
|
||||
start = *pp;
|
||||
if (! stab_demangle_type (minfo, pp,
|
||||
@@ -4753,7 +4754,7 @@ stab_demangle_type (minfo, pp, ptype)
|
||||
case 'F':
|
||||
/* A function. */
|
||||
{
|
||||
debug_type *args;
|
||||
debug_type *args = 0;
|
||||
bfd_boolean varargs;
|
||||
|
||||
++*pp;
|
||||
@@ -5146,7 +5147,7 @@ stab_demangle_fund_type (minfo, pp, ptype)
|
||||
|
||||
case 't':
|
||||
{
|
||||
char *name;
|
||||
char *name = 0;
|
||||
|
||||
if (! stab_demangle_template (minfo, pp,
|
||||
ptype != NULL ? &name : NULL))
|
||||
|
||||
@@ -351,6 +351,8 @@ do_scrub_chars (get, tostart, tolen)
|
||||
char *fromend;
|
||||
int fromlen;
|
||||
register int ch, ch2 = 0;
|
||||
/* Character that started the string we're working on. */
|
||||
static char quotechar;
|
||||
|
||||
/*State 0: beginning of normal line
|
||||
1: After first whitespace on line (flush more white)
|
||||
@@ -536,11 +538,8 @@ do_scrub_chars (get, tostart, tolen)
|
||||
for (s = from; s < fromend; s++)
|
||||
{
|
||||
ch = *s;
|
||||
/* This condition must be changed if the type of any
|
||||
other character can be LEX_IS_STRINGQUOTE. */
|
||||
if (ch == '\\'
|
||||
|| ch == '"'
|
||||
|| ch == '\''
|
||||
|| ch == quotechar
|
||||
|| ch == '\n')
|
||||
break;
|
||||
}
|
||||
@@ -558,12 +557,12 @@ do_scrub_chars (get, tostart, tolen)
|
||||
ch = GET ();
|
||||
if (ch == EOF)
|
||||
{
|
||||
as_warn (_("end of file in string; inserted '\"'"));
|
||||
as_warn (_("end of file in string; '%c' inserted"), quotechar);
|
||||
state = old_state;
|
||||
UNGET ('\n');
|
||||
PUT ('"');
|
||||
PUT (quotechar);
|
||||
}
|
||||
else if (lex[ch] == LEX_IS_STRINGQUOTE)
|
||||
else if (ch == quotechar)
|
||||
{
|
||||
state = old_state;
|
||||
PUT (ch);
|
||||
@@ -603,8 +602,8 @@ do_scrub_chars (get, tostart, tolen)
|
||||
continue;
|
||||
|
||||
case EOF:
|
||||
as_warn (_("end of file in string; '\"' inserted"));
|
||||
PUT ('"');
|
||||
as_warn (_("end of file in string; '%c' inserted"), quotechar);
|
||||
PUT (quotechar);
|
||||
continue;
|
||||
|
||||
case '"':
|
||||
@@ -638,10 +637,9 @@ do_scrub_chars (get, tostart, tolen)
|
||||
|
||||
case 7:
|
||||
ch = GET ();
|
||||
quotechar = ch;
|
||||
state = 5;
|
||||
old_state = 8;
|
||||
if (ch == EOF)
|
||||
goto fromeof;
|
||||
PUT (ch);
|
||||
continue;
|
||||
|
||||
@@ -952,6 +950,7 @@ do_scrub_chars (get, tostart, tolen)
|
||||
break;
|
||||
|
||||
case LEX_IS_STRINGQUOTE:
|
||||
quotechar = ch;
|
||||
if (state == 10)
|
||||
{
|
||||
/* Preserve the whitespace in foo "bar". */
|
||||
@@ -1279,6 +1278,8 @@ do_scrub_chars (get, tostart, tolen)
|
||||
case 1: *to++ = *from++;
|
||||
}
|
||||
}
|
||||
if (to >= toend)
|
||||
goto tofull;
|
||||
ch = GET ();
|
||||
}
|
||||
}
|
||||
@@ -1297,7 +1298,7 @@ do_scrub_chars (get, tostart, tolen)
|
||||
}
|
||||
else if (state == 9)
|
||||
{
|
||||
if (lex[ch] != LEX_IS_SYMBOL_COMPONENT)
|
||||
if (!IS_SYMBOL_COMPONENT (ch))
|
||||
state = 3;
|
||||
}
|
||||
else if (state == 10)
|
||||
|
||||
@@ -42,12 +42,25 @@ enum {
|
||||
|
||||
static void obj_amiga_line PARAMS ((int));
|
||||
static void obj_amiga_weak PARAMS ((int));
|
||||
static void obj_amiga_section PARAMS((int));
|
||||
static char * obj_amiga_section_name PARAMS ((void));
|
||||
|
||||
const pseudo_typeS obj_pseudo_table[] =
|
||||
{
|
||||
{"line", obj_amiga_line, 0}, /* source code line number */
|
||||
{"weak", obj_amiga_weak, 0}, /* mark symbol as weak. */
|
||||
|
||||
{"2byte", cons, 2},
|
||||
{"4byte", cons, 4},
|
||||
{"8byte", cons, 8},
|
||||
{"hidden", s_ignore, 0},
|
||||
{"local", s_ignore, 0},
|
||||
{"section", obj_amiga_section, 0},
|
||||
{"section.s", obj_amiga_section, 0},
|
||||
{"sect", obj_amiga_section, 0},
|
||||
{"sect.s", obj_amiga_section, 0},
|
||||
{"swbeg", s_ignore, 0},
|
||||
|
||||
/* other stuff */
|
||||
{"ABORT", s_abort, 0},
|
||||
|
||||
@@ -170,6 +183,58 @@ obj_amiga_frob_file_before_fix ()
|
||||
|
||||
#endif /* BFD_ASSEMBLER */
|
||||
|
||||
/* Get name of section. */
|
||||
static char *
|
||||
obj_amiga_section_name ()
|
||||
{
|
||||
char *name;
|
||||
|
||||
SKIP_WHITESPACE ();
|
||||
if (*input_line_pointer == '"')
|
||||
{
|
||||
int dummy;
|
||||
|
||||
name = demand_copy_C_string (&dummy);
|
||||
if (name == NULL)
|
||||
{
|
||||
ignore_rest_of_line ();
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
char *end = input_line_pointer;
|
||||
|
||||
while (0 == strchr ("\n\t,; ", *end))
|
||||
end++;
|
||||
if (end == input_line_pointer)
|
||||
{
|
||||
as_warn (_("missing name"));
|
||||
ignore_rest_of_line ();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
name = xmalloc (end - input_line_pointer + 1);
|
||||
memcpy (name, input_line_pointer, end - input_line_pointer);
|
||||
name[end - input_line_pointer] = '\0';
|
||||
input_line_pointer = end;
|
||||
}
|
||||
SKIP_WHITESPACE ();
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
static void obj_amiga_section(int push) {
|
||||
char const * name = obj_amiga_section_name();
|
||||
if (name == NULL)
|
||||
return;
|
||||
|
||||
if (0 == strcmp(".rodata", name))
|
||||
s_text();
|
||||
else
|
||||
s_data();
|
||||
}
|
||||
|
||||
static void
|
||||
obj_amiga_line (ignore)
|
||||
int ignore ATTRIBUTE_UNUSED;
|
||||
|
||||
@@ -75,6 +75,8 @@ const segT N_TYPE_seg[N_TYPE + 2] =
|
||||
static void obj_aout_line PARAMS ((int));
|
||||
static void obj_aout_weak PARAMS ((int));
|
||||
static void obj_aout_type PARAMS ((int));
|
||||
static void obj_section PARAMS((int));
|
||||
static char * obj_section_name PARAMS ((void));
|
||||
|
||||
const pseudo_typeS aout_pseudo_table[] =
|
||||
{
|
||||
@@ -100,6 +102,17 @@ const pseudo_typeS aout_pseudo_table[] =
|
||||
|
||||
{"optim", s_ignore, 0}, /* For sun386i cc (?) */
|
||||
|
||||
{"2byte", cons, 2},
|
||||
{"4byte", cons, 4},
|
||||
{"8byte", cons, 8},
|
||||
{"hidden", s_ignore, 0},
|
||||
{"local", s_ignore, 0},
|
||||
{"section", obj_section, 0},
|
||||
{"section.s", obj_section, 0},
|
||||
{"sect", obj_section, 0},
|
||||
{"sect.s", obj_section, 0},
|
||||
{"swbeg", s_ignore, 0},
|
||||
|
||||
/* other stuff */
|
||||
{"ABORT", s_abort, 0},
|
||||
|
||||
@@ -229,6 +242,61 @@ obj_aout_frob_file_before_fix ()
|
||||
|
||||
#else /* ! BFD_ASSEMBLER */
|
||||
|
||||
/* Get name of section. */
|
||||
static char *
|
||||
obj_section_name ()
|
||||
{
|
||||
char *name;
|
||||
|
||||
SKIP_WHITESPACE ();
|
||||
if (*input_line_pointer == '"')
|
||||
{
|
||||
int dummy;
|
||||
|
||||
name = demand_copy_C_string (&dummy);
|
||||
if (name == NULL)
|
||||
{
|
||||
ignore_rest_of_line ();
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
char *end = input_line_pointer;
|
||||
|
||||
while (0 == strchr ("\n\t,; ", *end))
|
||||
end++;
|
||||
if (end == input_line_pointer)
|
||||
{
|
||||
as_warn (_("missing name"));
|
||||
ignore_rest_of_line ();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
name = xmalloc (end - input_line_pointer + 1);
|
||||
memcpy (name, input_line_pointer, end - input_line_pointer);
|
||||
name[end - input_line_pointer] = '\0';
|
||||
input_line_pointer = end;
|
||||
}
|
||||
SKIP_WHITESPACE ();
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
static void obj_section(int push) {
|
||||
char const * name = obj_section_name();
|
||||
if (name == NULL)
|
||||
return;
|
||||
//printf("section: %s\r\n", name);
|
||||
if (0 == strcmp(".rodata", name)
|
||||
//|| 0 == strncmp(".text", name, 5)
|
||||
)
|
||||
s_text(push);
|
||||
else
|
||||
s_data(push);
|
||||
}
|
||||
|
||||
|
||||
/* Relocation. */
|
||||
|
||||
/*
|
||||
|
||||
@@ -132,6 +132,10 @@ int elf_s_get_other PARAMS ((symbolS *));
|
||||
(elf_symbol (symbol_get_bfdsym (S))->internal_elf_sym.st_other = (V))
|
||||
#endif
|
||||
|
||||
#ifndef S_GET_TYPE
|
||||
#define S_GET_TYPE(S) (0)
|
||||
#endif
|
||||
|
||||
extern asection *gdb_section;
|
||||
|
||||
#ifndef obj_frob_file
|
||||
|
||||
@@ -7034,7 +7034,9 @@ md_parse_option (c, arg)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (arg[0] == 'c' && arg[1] == '6')
|
||||
if (arg[0] == 'c' && arg[1] == 'p' && arg[2] == 'u' && arg[3] == '=')
|
||||
arg += 4;
|
||||
else if (arg[0] == 'c' && arg[1] == '6')
|
||||
arg++;
|
||||
|
||||
for (i = 0; i < n_archs; i++)
|
||||
|
||||
+14
-4
@@ -237,6 +237,9 @@ static segT get_known_segmented_expression PARAMS ((expressionS * expP));
|
||||
static void pobegin PARAMS ((void));
|
||||
static int get_line_sb PARAMS ((sb *));
|
||||
static void generate_file_debug PARAMS ((void));
|
||||
void ignore_rest_of_line (void);
|
||||
static void ignore_rest_of_line2 (int);
|
||||
|
||||
|
||||
void
|
||||
read_begin ()
|
||||
@@ -1425,7 +1428,8 @@ s_comm (ignore)
|
||||
#endif /* not OBJ_VMS */
|
||||
know (symbolP->sy_frag == &zero_address_frag);
|
||||
|
||||
demand_empty_rest_of_line ();
|
||||
ignore_rest_of_line2 (0);
|
||||
// demand_empty_rest_of_line ();
|
||||
|
||||
if (flag_mri)
|
||||
mri_comment_end (stop, stopc);
|
||||
@@ -3167,15 +3171,21 @@ demand_empty_rest_of_line ()
|
||||
|
||||
void
|
||||
ignore_rest_of_line ()
|
||||
{
|
||||
ignore_rest_of_line2(1);
|
||||
}
|
||||
|
||||
void
|
||||
ignore_rest_of_line2 (int out)
|
||||
{
|
||||
/* For suspect lines: gives warning. */
|
||||
if (!is_end_of_line[(unsigned char) *input_line_pointer])
|
||||
{
|
||||
if (ISPRINT (*input_line_pointer))
|
||||
as_warn (_("rest of line ignored; first ignored character is `%c'"),
|
||||
if (out) as_warn (_("rest of line ignored; first ignored character is `%c'"),
|
||||
*input_line_pointer);
|
||||
else
|
||||
as_warn (_("rest of line ignored; first ignored character valued 0x%x"),
|
||||
if (out) as_warn (_("rest of line ignored; first ignored character valued 0x%x"),
|
||||
*input_line_pointer);
|
||||
|
||||
while (input_line_pointer < buffer_limit
|
||||
@@ -3355,7 +3365,7 @@ parse_repeat_cons PARAMS ((expressionS *exp, unsigned int nbytes));
|
||||
|
||||
static void
|
||||
cons_worker (nbytes, rva)
|
||||
register int nbytes; /* 1=.byte, 2=.word, 4=.long. */
|
||||
register int nbytes; /* 1=.byte, 2=.word, 4=.long, 8=.8bytes. */
|
||||
int rva;
|
||||
{
|
||||
int c;
|
||||
|
||||
+1
-1
@@ -192,7 +192,7 @@ TODO acinclude.m4 aclocal.m4 configure configure.in gconfig.in
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = gtar
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
SOURCES = $(gprof_SOURCES)
|
||||
OBJECTS = $(gprof_OBJECTS)
|
||||
|
||||
@@ -246,6 +246,7 @@ extern int print_insn_iq2000 PARAMS ((bfd_vma, disassemble_info *));
|
||||
extern disassembler_ftype arc_get_disassembler PARAMS ((void *));
|
||||
extern disassembler_ftype cris_get_disassembler PARAMS ((bfd *));
|
||||
|
||||
extern void print_m68k_disassembler_options PARAMS ((FILE *));
|
||||
extern void print_mips_disassembler_options PARAMS ((FILE *));
|
||||
extern void print_ppc_disassembler_options PARAMS ((FILE *));
|
||||
extern void print_arm_disassembler_options PARAMS ((FILE *));
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
the application unable to be configured for both "same" and "binary"
|
||||
variant systems. */
|
||||
|
||||
#define FOPEN_RB "r"
|
||||
#define FOPEN_WB "w"
|
||||
#define FOPEN_AB "a"
|
||||
#define FOPEN_RUB "r+"
|
||||
#define FOPEN_WUB "w+"
|
||||
#define FOPEN_AUB "a+"
|
||||
#define FOPEN_RB "rb"
|
||||
#define FOPEN_WB "wb"
|
||||
#define FOPEN_AB "ab"
|
||||
#define FOPEN_RUB "r+b"
|
||||
#define FOPEN_WUB "w+b"
|
||||
#define FOPEN_AUB "a+b"
|
||||
|
||||
#define FOPEN_RT "r"
|
||||
#define FOPEN_WT "w"
|
||||
|
||||
+1
-1
@@ -341,7 +341,7 @@ sh64-*-elf*)
|
||||
m68k-sony-*) targ_emul=news ;;
|
||||
m68k-hp-bsd*) targ_emul=hp300bsd ;;
|
||||
m68*-motorola-sysv*) targ_emul=delta68 ;;
|
||||
m68*-*-amigaos*) targ_emul=amiga ; targ_extra_emuls=amiga_bss;;
|
||||
m68*-amigaos* | m68*-*-amigaos*) targ_emul=amiga ; targ_extra_emuls=amiga_bss;;
|
||||
m68*-*-aout) targ_emul=m68kaout ;;
|
||||
m68*-*-coff) targ_emul=m68kcoff ;;
|
||||
m68*-*-elf) targ_emul=m68kelf ;;
|
||||
|
||||
@@ -4,3 +4,4 @@ TEXT_START_ADDR=0x0
|
||||
SEGMENT_SIZE=0x0
|
||||
TEMPLATE_NAME=amiga
|
||||
ARCH=m68k
|
||||
EMULATION_NAME=amiga
|
||||
@@ -4,3 +4,4 @@ TEXT_START_ADDR=0x0
|
||||
SEGMENT_SIZE=0x0
|
||||
TEMPLATE_NAME=amiga
|
||||
ARCH=m68k
|
||||
EMULATION_NAME=amiga_bss
|
||||
+2
-2
@@ -307,7 +307,7 @@ fold_unary (tree, current_section, allocation_done, dot, dotp)
|
||||
|
||||
case '-':
|
||||
make_abs (&result);
|
||||
result.value = -result.value;
|
||||
result.value = -(long)result.value;
|
||||
break;
|
||||
|
||||
case NEXT:
|
||||
@@ -668,7 +668,7 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
|
||||
bfd_vma dot;
|
||||
bfd_vma *dotp;
|
||||
{
|
||||
etree_value_type result;
|
||||
etree_value_type result = { 0, 0, 0, 0 };
|
||||
|
||||
if (tree == NULL)
|
||||
{
|
||||
|
||||
+1
-1
@@ -3377,7 +3377,7 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax,
|
||||
a page could be saved in the data segment. */
|
||||
bfd_vma first, last;
|
||||
|
||||
first = -exp_data_seg.base & (exp_data_seg.pagesize - 1);
|
||||
first = -(long)exp_data_seg.base & (exp_data_seg.pagesize - 1);
|
||||
last = exp_data_seg.end & (exp_data_seg.pagesize - 1);
|
||||
if (first && last
|
||||
&& ((exp_data_seg.base & ~(exp_data_seg.pagesize - 1))
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
#endif
|
||||
|
||||
/* First, we deal with platform-specific or compiler-specific issues. */
|
||||
|
||||
#include "config.h"
|
||||
/* begin standard C headers. */
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
+2
-2
@@ -162,7 +162,7 @@ static struct bfd_link_callbacks link_callbacks =
|
||||
struct bfd_link_info link_info;
|
||||
|
||||
static void
|
||||
remove_output ()
|
||||
remove_output (void)
|
||||
{
|
||||
if (output_filename)
|
||||
{
|
||||
@@ -1018,7 +1018,7 @@ multiple_common (info, name, obfd, otype, osize, nbfd, ntype, nsize)
|
||||
bfd_vma nsize;
|
||||
{
|
||||
if (! config.warn_common)
|
||||
return TRUE;
|
||||
return 2;
|
||||
|
||||
if (ntype == bfd_link_hash_defined
|
||||
|| ntype == bfd_link_hash_defweak
|
||||
|
||||
@@ -50,6 +50,10 @@ components will be simplified. The returned value will be allocated using
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#ifndef DIR_SEPARATOR_S
|
||||
#define DIR_SEPARATOR_S "/"
|
||||
#endif
|
||||
|
||||
/* On GNU libc systems the declaration is only visible with _GNU_SOURCE. */
|
||||
#if defined(HAVE_CANONICALIZE_FILE_NAME) \
|
||||
&& defined(NEED_DECLARATION_CANONICALIZE_FILE_NAME)
|
||||
|
||||
+2
-1
@@ -67,6 +67,7 @@ pwait (pid, status, flags)
|
||||
{
|
||||
/* ??? Here's an opportunity to canonicalize the values in STATUS.
|
||||
Needed? */
|
||||
int pid = wait (status);
|
||||
//int
|
||||
pid = wait (status);
|
||||
return pid;
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
|
||||
char * const *argv;
|
||||
const char *this_pname;
|
||||
const char *temp_base;
|
||||
char **errmsg_fmt, **errmsg_arg;
|
||||
const char **errmsg_fmt, **errmsg_arg;
|
||||
int flags;
|
||||
{
|
||||
int pid;
|
||||
|
||||
+1
-1
@@ -152,7 +152,7 @@ physmem_total ()
|
||||
#if defined _WIN32
|
||||
{ /* this works on windows */
|
||||
PFN_MS_EX pfnex;
|
||||
HMODULE h = GetModuleHandle ("kernel32.dll");
|
||||
HMODULE h = GetModuleHandleA ("kernel32.dll");
|
||||
|
||||
if (!h)
|
||||
return 0.0;
|
||||
|
||||
+1
-1
@@ -12,10 +12,10 @@ exists, it is removed.
|
||||
|
||||
*/
|
||||
|
||||
#include "ansidecl.h"
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include "ansidecl.h"
|
||||
#include <errno.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ not be used in new projects. Use @code{mkstemp} instead.
|
||||
@end deftypefn
|
||||
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#ifndef L_tmpnam
|
||||
|
||||
@@ -13,10 +13,10 @@ will never return a @code{NULL} pointer.
|
||||
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include "libiberty.h"
|
||||
#include "config.h"
|
||||
|
||||
#ifdef VMS
|
||||
#include <errno.h>
|
||||
|
||||
@@ -1038,10 +1038,9 @@ aix4* | aix5*)
|
||||
;;
|
||||
|
||||
amigaos*)
|
||||
library_names_spec='$libname.library $libname.a'
|
||||
library_names_spec='$libname.ixlibrary $libname.a'
|
||||
# Create ${libname}_ixlibrary.a entries in /sys/libs.
|
||||
#FIXME: finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
|
||||
finish_eval='/bin/true';
|
||||
finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
|
||||
;;
|
||||
|
||||
beos*)
|
||||
|
||||
@@ -391,6 +391,8 @@ disassembler_usage (stream)
|
||||
#ifdef ARCH_powerpc
|
||||
print_ppc_disassembler_options (stream);
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_m68k
|
||||
print_m68k_disassembler_options (stream);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
+68
-2
@@ -25,6 +25,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "opcode/m68k.h"
|
||||
|
||||
/* Extra info to pass to the disassembler address printing function. */
|
||||
struct objdump_disasm_info
|
||||
{
|
||||
bfd *abfd;
|
||||
asection *sec;
|
||||
bfd_boolean require_sec;
|
||||
};
|
||||
|
||||
/* Support display of symbols in baserel offsets. */
|
||||
static void
|
||||
parse_disassembler_options (char *);
|
||||
|
||||
static int dump_baserel;
|
||||
|
||||
/* Local function prototypes */
|
||||
|
||||
static int
|
||||
@@ -193,6 +207,14 @@ print_insn_m68k (memaddr, info)
|
||||
static int numopcodes[16];
|
||||
static const struct m68k_opcode **opcodes[16];
|
||||
|
||||
if (info->disassembler_options)
|
||||
{
|
||||
parse_disassembler_options (info->disassembler_options);
|
||||
|
||||
/* To avoid repeated parsing of these options, we remove them here. */
|
||||
info->disassembler_options = NULL;
|
||||
}
|
||||
|
||||
if (!opcodes[0])
|
||||
{
|
||||
/* Speed up the matching by sorting the opcode table on the upper
|
||||
@@ -1312,7 +1334,7 @@ print_base (regno, disp, info)
|
||||
}
|
||||
else
|
||||
{
|
||||
char buf[50];
|
||||
char buf[250];
|
||||
|
||||
if (regno == -2)
|
||||
(*info->fprintf_func) (info->stream, "@(");
|
||||
@@ -1321,7 +1343,51 @@ print_base (regno, disp, info)
|
||||
else
|
||||
(*info->fprintf_func) (info->stream, "%s@(", reg_names[regno]);
|
||||
|
||||
sprintf_vma (buf, disp);
|
||||
/* Dump the symbol instead of the number*/
|
||||
if (dump_baserel && regno == 12)
|
||||
{
|
||||
static int offset;
|
||||
|
||||
struct objdump_disasm_info *aux =
|
||||
(struct objdump_disasm_info *) info->application_data;
|
||||
asection * text = aux->sec;
|
||||
aux->sec = text->next;
|
||||
memset (buf, 0, sizeof(buf));
|
||||
|
||||
/* Try handling a4 set to 0 or set to -0x7ffe.
|
||||
* TODO: search the correct offset via lea statement.
|
||||
*/
|
||||
if (disp & 0x80000000)
|
||||
offset = 0x7ffe;
|
||||
(*info->print_address_func) (disp + offset, info);
|
||||
aux->sec = text;
|
||||
}
|
||||
else
|
||||
sprintf_vma (buf, disp);
|
||||
(*info->fprintf_func) (info->stream, "%s", buf);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void print_m68k_disassembler_options PARAMS ((FILE * stream))
|
||||
{
|
||||
fprintf (stream, _("\n\
|
||||
The following m68k specific disassembler options are supported for use with\n\
|
||||
the -M switch:\n"));
|
||||
fprintf (stream, " a4 Display labels for base relative offsets\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* Support -M a4
|
||||
*/
|
||||
static void
|
||||
parse_disassembler_options (char * options)
|
||||
{
|
||||
char *p;
|
||||
|
||||
p = options;
|
||||
while (*p && *p <= 32)
|
||||
++p;
|
||||
|
||||
dump_baserel = !strncmp(p, "a4", 2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user