diff options
author | Nick Clifton <nickc@redhat.com> | 2004-10-18 08:02:25 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2004-10-18 08:02:25 +0000 |
commit | 32c8df419d789a648f71e4799fabcd3f9b79597e (patch) | |
tree | 65959caa0c5632644369269a49a449d2344e5858 /gas/config/tc-xstormy16.c | |
parent | ff226b2f4a2c27e8fb2f702c3109b4729ed39914 (diff) | |
download | binutils-redhat-32c8df419d789a648f71e4799fabcd3f9b79597e.tar.gz |
Accept and ignore @fptr() directives for 4-byte fixups.
Diffstat (limited to 'gas/config/tc-xstormy16.c')
-rw-r--r-- | gas/config/tc-xstormy16.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/gas/config/tc-xstormy16.c b/gas/config/tc-xstormy16.c index 83ae94d382..f00a86613b 100644 --- a/gas/config/tc-xstormy16.c +++ b/gas/config/tc-xstormy16.c @@ -206,13 +206,29 @@ xstormy16_cons_fix_new (f, where, nbytes, exp) if (exp->X_op == O_fptr_symbol) { - if (nbytes != 2) + switch (nbytes) { + case 4: + /* This can happen when gcc is generating debug output. + For example it can create a stab with the address of + a function: + + .stabs "foo:F(0,21)",36,0,0,@fptr(foo) + + Since this does not involve switching code pages, we + just allow the reloc to be generated without any + @fptr behaviour. */ + exp->X_op = O_symbol; + code = BFD_RELOC_32; + break; + case 2: + exp->X_op = O_symbol; + code = BFD_RELOC_XSTORMY16_FPTR16; + break; + default: as_bad ("unsupported fptr fixup size %d", nbytes); return; } - exp->X_op = O_symbol; - code = BFD_RELOC_XSTORMY16_FPTR16; } else if (nbytes == 1) code = BFD_RELOC_8; |