mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 12:23:31 +08:00
gas/
* config/tc-tic6x.c (tic6x_fix_adjustable): New function. * config/tc-tic6x.h (tic6x_fix_adjustable): Declare. (tc_fix_adjustable): New macro. gas/testsuite/ * gas/tic6x/got-reloc.s: New test. * gas/tic6x/got-reloc.d: New test.
This commit is contained in:
@ -1,3 +1,9 @@
|
||||
2010-09-27 Bernd Schmidt <bernds@codesourcery.com>
|
||||
|
||||
* config/tc-tic6x.c (tic6x_fix_adjustable): New function.
|
||||
* config/tc-tic6x.h (tic6x_fix_adjustable): Declare.
|
||||
(tc_fix_adjustable): New macro.
|
||||
|
||||
2010-09-27 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
|
||||
|
||||
* config/tc-s390.c: (md_parse_option): New option -march=z196.
|
||||
|
@ -1591,6 +1591,25 @@ tic6x_init_fix_data (fixS *fixP)
|
||||
fixP->tc_fix_data.fix_adda = FALSE;
|
||||
}
|
||||
|
||||
/* Return true if the fix can be handled by GAS, false if it must
|
||||
be passed through to the linker. */
|
||||
|
||||
bfd_boolean
|
||||
tic6x_fix_adjustable (fixS *fixP)
|
||||
{
|
||||
switch (fixP->fx_r_type)
|
||||
{
|
||||
/* Adjust_reloc_syms doesn't know about the GOT. */
|
||||
case BFD_RELOC_C6000_SBR_GOT_U15_W:
|
||||
case BFD_RELOC_C6000_SBR_GOT_H16_W:
|
||||
case BFD_RELOC_C6000_SBR_GOT_L16_W:
|
||||
return 0;
|
||||
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Given the fine-grained form of an operand, return the coarse
|
||||
(bit-mask) form. */
|
||||
|
||||
|
@ -147,6 +147,9 @@ extern void tic6x_start_line_hook (void);
|
||||
extern void tic6x_cons_fix_new (fragS *frag, int where, int size,
|
||||
expressionS *exp);
|
||||
|
||||
#define tc_fix_adjustable(FIX) tic6x_fix_adjustable (FIX)
|
||||
extern bfd_boolean tic6x_fix_adjustable (struct fix *);
|
||||
|
||||
#define tc_frob_label(sym) tic6x_frob_label (sym)
|
||||
extern void tic6x_frob_label (symbolS *sym);
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2010-09-27 Bernd Schmidt <bernds@codesourcery.com>
|
||||
|
||||
* gas/tic6x/got-reloc.s: New test.
|
||||
* gas/tic6x/got-reloc.d: New test.
|
||||
|
||||
2010-09-27 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
|
||||
|
||||
* gas/s390/s390.exp: Run the zarch-z196 test.
|
||||
|
14
gas/testsuite/gas/tic6x/got-reloc.d
Normal file
14
gas/testsuite/gas/tic6x/got-reloc.d
Normal file
@ -0,0 +1,14 @@
|
||||
#objdump: -dr --prefix-addresses --show-raw-insn
|
||||
#name: C6X GOT relocs
|
||||
#as: -march=c674x -mlittle-endian
|
||||
|
||||
.*: *file format elf32-tic6x-le
|
||||
|
||||
Disassembly of section \.text:
|
||||
0+00 <[^>]*> 0000006e[ \t]+ldw \.D2T2 \*\+b14\(0\),b0
|
||||
[ \t]*0: R_C6000_SBR_GOT_U15_W[ \t]+\.LC1
|
||||
0+04 <[^>]*> 0080002a[ \t]+mvk \.S2 0,b1
|
||||
[ \t]*4: R_C6000_SBR_GOT_L16_W[ \t]+\.LC1
|
||||
0+08 <[^>]*> 0080006a[ \t]+mvkh \.S2 0,b1
|
||||
[ \t]*8: R_C6000_SBR_GOT_H16_W[ \t]+\.LC1
|
||||
[ \t]*\.\.\.
|
15
gas/testsuite/gas/tic6x/got-reloc.s
Normal file
15
gas/testsuite/gas/tic6x/got-reloc.s
Normal file
@ -0,0 +1,15 @@
|
||||
# Test that no GOT relocs with an addend are produced.
|
||||
.section .const.str1.1,"aMS",@progbits,1
|
||||
.LC0:
|
||||
.string "foo"
|
||||
.LC1:
|
||||
.string "bar"
|
||||
.text
|
||||
.nocmp
|
||||
.globl f
|
||||
f:
|
||||
ldw .d2t2 *+B14($GOT(.LC1)), B0
|
||||
mvkl .s2 $DPR_GOT(.LC1), B1
|
||||
mvkh .s2 $DPR_GOT(.LC1), B1
|
||||
|
||||
|
Reference in New Issue
Block a user