From bb41ade59e14e2710a5017c8946034fa88980313 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 18 Oct 2004 12:32:13 +0000 Subject: [PATCH] * config/tc-i386.c (O_secrel): Delete. (tc_pe_dwarf2_emit_offset): New function. * config/tc-i386.h (O_secrel): Define as O_md1. (TC_DWARF2_EMIT_OFFSET): Define. --- gas/ChangeLog | 7 +++++++ gas/config/tc-i386.c | 15 +++++++++++++-- gas/config/tc-i386.h | 9 +++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 5df3b55063e..084ff852b57 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2004-10-18 Aaron W. LaFramboise + + * config/tc-i386.c (O_secrel): Delete. + (tc_pe_dwarf2_emit_offset): New function. + * config/tc-i386.h (O_secrel): Define as O_md1. + (TC_DWARF2_EMIT_OFFSET): Define. + 2004-10-18 Nick Clifton * config/tc-xstormy16.c (xstormy16_cons_fix_new): Accept and diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 9f398d9354d..b2f42dc876e 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -3658,8 +3658,6 @@ x86_cons (exp, size) #ifdef TE_PE -#define O_secrel (O_max + 1) - void x86_pe_cons_fix_new (frag, off, len, exp) fragS *frag; @@ -6360,3 +6358,16 @@ i386_elf_section_type (const char *str, size_t len) return -1; } + +#ifdef TE_PE +void +tc_pe_dwarf2_emit_offset (symbolS *symbol, unsigned int size) +{ + expressionS expr; + + expr.X_op = O_secrel; + expr.X_add_symbol = symbol; + expr.X_add_number = 0; + emit_expr (&expr, size); +} +#endif diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h index 721292a539f..d5d0ca8360d 100644 --- a/gas/config/tc-i386.h +++ b/gas/config/tc-i386.h @@ -505,4 +505,13 @@ extern void tc_x86_frame_initial_instructions PARAMS ((void)); #define md_elf_section_type(str,len) i386_elf_section_type (str, len) extern int i386_elf_section_type PARAMS ((const char *, size_t len)); +#ifdef TE_PE + +#define O_secrel O_md1 + +#define TC_DWARF2_EMIT_OFFSET tc_pe_dwarf2_emit_offset +void tc_pe_dwarf2_emit_offset (symbolS *, unsigned int); + +#endif /* TE_PE */ + #endif /* TC_I386 */ -- 2.30.2