PIC enhancements just checked in (based on work of Paul Kranenburg and Eric
Youngdale). New debugging code for .gdbinit. "this file generated..." msg in config.h.
This commit is contained in:
parent
f0b37b4ad6
commit
c570d36139
@ -1,3 +1,67 @@
|
|||||||
|
Mon Sep 12 20:56:38 1994 Ken Raeburn (raeburn@kr-laptop.cygnus.com)
|
||||||
|
|
||||||
|
* .gdbinit (pe, ps): Define new commands.
|
||||||
|
* symbols.c (indent_level): New static variable.
|
||||||
|
(indent, print_expr_1, print_symbol_value_1, print_symbol_value,
|
||||||
|
print_expr): New functions.
|
||||||
|
|
||||||
|
* Makefile.in (config-stamp): Add a "this file generated by make"
|
||||||
|
message to config.h.
|
||||||
|
|
||||||
|
PIC implementation for i386-linux, based on code from Eric
|
||||||
|
Youngdale and Paul Kranenburg, with some work of my own:
|
||||||
|
|
||||||
|
* write.c (fixup_segment): Test TC_RELOC_RTSYM_LOC_FIXUP on fixup
|
||||||
|
before processing same-section pcrel relocations.
|
||||||
|
(TC_RELOC_RTSYM_LOC_FIXUP): Default to 1.
|
||||||
|
|
||||||
|
* expr.c (make_expr_symbol): If operator is O_symbol and
|
||||||
|
X_add_number is zero, just return the symbol. If operator is
|
||||||
|
O_constant, resolve the symbol's value before returning.
|
||||||
|
(operand): Permit use of "[]" for grouping.
|
||||||
|
(clean_up_expression): For difference of two symbols in the same
|
||||||
|
frag, add the difference of their offsets into X_add_number.
|
||||||
|
(expr): Reduce difference of two symbols in same frag to their
|
||||||
|
difference.
|
||||||
|
|
||||||
|
* config/tc-i386.c (TC_RELOC): New macro.
|
||||||
|
(struct _i386_insn): New field disp_reloc.
|
||||||
|
(GOT_symbol): New variable.
|
||||||
|
(operand_special_chars): Added square-brackets and at-sign.
|
||||||
|
(reloc) [BFD_ASSEMBLER]: Added new argument OTHER; if it is not
|
||||||
|
NO_RELOC, just return it.
|
||||||
|
(reloc) [! BFD_ASSEMBLER]: Add third argument to dummy macro.
|
||||||
|
(BFD_RELOC_386_PLT32, _GOT32, _GOTOFF) [! BFD_ASSEMBLER]: More
|
||||||
|
dummy macros.
|
||||||
|
(tc_i386_fix_adjustable): New function. Returns zero if symbol in
|
||||||
|
fixup is not local, to prevent relocations against externals from
|
||||||
|
being dropped.
|
||||||
|
(md_assemble): Initialize disp_reloc field to NO_RELOC. Pass
|
||||||
|
disp_reloc field to reloc() function, and use TC_RELOC to generate
|
||||||
|
value to pass to fix_new_exp.
|
||||||
|
(md_assemble): Change 32-bit reloc against GOT_symbol into a GOTPC
|
||||||
|
reloc.
|
||||||
|
(i386_operand): Initialize disp_reloc field to NO_RELOC. Handle
|
||||||
|
@GOTOFF, @PLT, @GOT operands. For GOTOFF relocations with local
|
||||||
|
symbols, force generation of the section symbol.
|
||||||
|
(md_estimate_size_before_relax): If GOT_symbol exists, decide
|
||||||
|
we're generating PIC code, and convert relocations against
|
||||||
|
undefined symbols from PCREL to PLT32.
|
||||||
|
(md_apply_fix_1) [OBJ_ELF]: Fix up values for dynamic-linking
|
||||||
|
relocs.
|
||||||
|
(md_undefined_symbol): Notice GLOBAL_OFFSET_TABLE_NAME and set
|
||||||
|
and return GOT_symbol if it matches.
|
||||||
|
(F, MAP): Move macro definitions outside function.
|
||||||
|
(tc_gen_reloc): Only switch on size and pcrel if code wasn't
|
||||||
|
already supplied as PLT32. GOT32, GOTOFF, or GOTPC. Convert
|
||||||
|
BFD_RELOC_32 using GOT_symbol into GOTPC.
|
||||||
|
* config/tc-i386.h (TC_RELOC, tc_fix_adjustable,
|
||||||
|
TC_RELOC_GLOBAL_OFFSET_TABLE, TC_RELOC_RTSYM_LOC_FIXUP): New
|
||||||
|
macros.
|
||||||
|
(NEED_FX_R_TYPE): Define.
|
||||||
|
(LOCAL_LABEL): Accept ".X" prefix too.
|
||||||
|
(GLOBAL_OFFSET_TABLE_NAME): Default to "_GLOBAL_OFFSET_TABLE_".
|
||||||
|
|
||||||
Mon Sep 12 17:51:39 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
|
Mon Sep 12 17:51:39 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
|
||||||
|
|
||||||
* config/obj-elf.c (obj_elf_type): Rewrite to accept syntax
|
* config/obj-elf.c (obj_elf_type): Rewrite to accept syntax
|
||||||
|
Loading…
x
Reference in New Issue
Block a user