X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gas%2Fconfig%2Ftc-or1k.c;h=5af47cf8c2cfe14ab17ac177d4c65b80252b0807;hb=bd920864f3dc2cad376989a642ab774aef6b2fce;hp=18db23095bd7103e8df88cb74fe94a2edd07e3c7;hpb=8d3842cd156eb6cd6cd6c68c49c090b8f9452a2d;p=deliverable%2Fbinutils-gdb.git diff --git a/gas/config/tc-or1k.c b/gas/config/tc-or1k.c index 18db23095b..5af47cf8c2 100644 --- a/gas/config/tc-or1k.c +++ b/gas/config/tc-or1k.c @@ -1,5 +1,5 @@ /* tc-or1k.c -- Assembler for the OpenRISC family. - Copyright (C) 2001-2015 Free Software Foundation, Inc. + Copyright (C) 2001-2020 Free Software Foundation, Inc. Contributed for OR32 by Johan Rydberg, jrydberg@opencores.org This file is part of GAS, the GNU Assembler. @@ -67,7 +67,7 @@ size_t md_longopts_size = sizeof (md_longopts); unsigned long or1k_machine = 0; /* default */ int -md_parse_option (int c ATTRIBUTE_UNUSED, char * arg ATTRIBUTE_UNUSED) +md_parse_option (int c ATTRIBUTE_UNUSED, const char * arg ATTRIBUTE_UNUSED) { return 0; } @@ -165,7 +165,7 @@ md_operand (expressionS * expressionP) valueT md_section_align (segT segment, valueT size) { - int align = bfd_get_section_alignment (stdoutput, segment); + int align = bfd_section_alignment (segment); return ((size + (1 << align) - 1) & -(1 << align)); } @@ -275,10 +275,7 @@ md_number_to_chars (char * buf, valueT val, int n) type, and store the appropriate bytes in *litP. The number of LITTLENUMS emitted is stored in *sizeP . An error message is returned, or NULL on OK. */ -/* Equal to MAX_PRECISION in atof-ieee.c. */ -#define MAX_LITTLENUMS 6 - -char * +const char * md_atof (int type, char * litP, int * sizeP) { return ieee_md_atof (type, litP, sizeP, TRUE); @@ -303,9 +300,9 @@ tc_gen_reloc (asection * section, fixS * fixp) arelent *reloc; bfd_reloc_code_real_type code; - reloc = xmalloc (sizeof (arelent)); + reloc = XNEW (arelent); - reloc->sym_ptr_ptr = xmalloc (sizeof (asymbol *)); + reloc->sym_ptr_ptr = XNEW (asymbol *); *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy); reloc->address = fixp->fx_frag->fr_address + fixp->fx_where; @@ -362,12 +359,18 @@ or1k_apply_fix (struct fix *f, valueT *t, segT s) { case BFD_RELOC_OR1K_TLS_GD_HI16: case BFD_RELOC_OR1K_TLS_GD_LO16: + case BFD_RELOC_OR1K_TLS_GD_PG21: + case BFD_RELOC_OR1K_TLS_GD_LO13: case BFD_RELOC_OR1K_TLS_LDM_HI16: case BFD_RELOC_OR1K_TLS_LDM_LO16: + case BFD_RELOC_OR1K_TLS_LDM_PG21: + case BFD_RELOC_OR1K_TLS_LDM_LO13: case BFD_RELOC_OR1K_TLS_LDO_HI16: case BFD_RELOC_OR1K_TLS_LDO_LO16: case BFD_RELOC_OR1K_TLS_IE_HI16: case BFD_RELOC_OR1K_TLS_IE_LO16: + case BFD_RELOC_OR1K_TLS_IE_PG21: + case BFD_RELOC_OR1K_TLS_IE_LO13: case BFD_RELOC_OR1K_TLS_LE_HI16: case BFD_RELOC_OR1K_TLS_LE_LO16: S_SET_THREAD_LOCAL (f->fx_addsy);