mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08:00
* config/obj-coff.c (fixup_segment): Never subtract section
address from PC relative reloc which will be fully resolved.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Wed Jul 2 12:05:00 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* config/obj-coff.c (fixup_segment): Never subtract section
|
||||||
|
address from PC relative reloc which will be fully resolved.
|
||||||
|
|
||||||
Tue Jul 1 15:23:07 1997 Jeffrey A Law (law@cygnus.com)
|
Tue Jul 1 15:23:07 1997 Jeffrey A Law (law@cygnus.com)
|
||||||
|
|
||||||
* ecoff.c (page_type): Renamed from page_t to avoid conflict
|
* ecoff.c (page_type): Renamed from page_t to avoid conflict
|
||||||
|
@ -1909,6 +1909,9 @@ coff_header_append (abfd, h)
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
char buffer[1000];
|
char buffer[1000];
|
||||||
char buffero[1000];
|
char buffero[1000];
|
||||||
|
#ifdef COFF_LONG_SECTION_NAMES
|
||||||
|
unsigned long string_size = 4;
|
||||||
|
#endif
|
||||||
|
|
||||||
bfd_seek (abfd, 0, 0);
|
bfd_seek (abfd, 0, 0);
|
||||||
|
|
||||||
@ -1931,10 +1934,6 @@ coff_header_append (abfd, h)
|
|||||||
|
|
||||||
for (i = SEG_E0; i < SEG_LAST; i++)
|
for (i = SEG_E0; i < SEG_LAST; i++)
|
||||||
{
|
{
|
||||||
#ifdef COFF_LONG_SECTION_NAMES
|
|
||||||
unsigned long string_size = 4;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (segment_info[i].scnhdr.s_name[0])
|
if (segment_info[i].scnhdr.s_name[0])
|
||||||
{
|
{
|
||||||
unsigned int size;
|
unsigned int size;
|
||||||
@ -1979,8 +1978,12 @@ symbol_to_chars (abfd, where, symbolP)
|
|||||||
}
|
}
|
||||||
/* At the same time, relocate all symbols to their output value */
|
/* At the same time, relocate all symbols to their output value */
|
||||||
|
|
||||||
|
#ifndef TE_PE
|
||||||
val = (segment_info[S_GET_SEGMENT (symbolP)].scnhdr.s_paddr
|
val = (segment_info[S_GET_SEGMENT (symbolP)].scnhdr.s_paddr
|
||||||
+ S_GET_VALUE (symbolP));
|
+ S_GET_VALUE (symbolP));
|
||||||
|
#else
|
||||||
|
val = S_GET_VALUE (symbolP);
|
||||||
|
#endif
|
||||||
|
|
||||||
S_SET_VALUE (symbolP, val);
|
S_SET_VALUE (symbolP, val);
|
||||||
|
|
||||||
@ -3145,10 +3148,8 @@ write_object_file ()
|
|||||||
#define SUB_SEGMENT_ALIGN(SEG) 1
|
#define SUB_SEGMENT_ALIGN(SEG) 1
|
||||||
#endif
|
#endif
|
||||||
#ifdef md_do_align
|
#ifdef md_do_align
|
||||||
{
|
md_do_align (SUB_SEGMENT_ALIGN (now_seg), (char *) NULL, 0, 0,
|
||||||
static char nop = NOP_OPCODE;
|
alignment_done);
|
||||||
md_do_align (SUB_SEGMENT_ALIGN (now_seg), &nop, 1, 0, alignment_done);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
frag_align (SUB_SEGMENT_ALIGN (now_seg), NOP_OPCODE, 0);
|
frag_align (SUB_SEGMENT_ALIGN (now_seg), NOP_OPCODE, 0);
|
||||||
#ifdef md_do_align
|
#ifdef md_do_align
|
||||||
@ -3625,6 +3626,11 @@ c_section_symbol (name, idx)
|
|||||||
|
|
||||||
SF_SET_STATICS (symbolP);
|
SF_SET_STATICS (symbolP);
|
||||||
|
|
||||||
|
#ifdef TE_DELTA
|
||||||
|
/* manfred@s-direktnet.de: section symbols *must* have the LOCAL bit cleared,
|
||||||
|
which is set by the new definition of LOCAL_LABEL in tc-m68k.h. */
|
||||||
|
SF_CLEAR_LOCAL (symbolP);
|
||||||
|
#endif
|
||||||
#ifdef TE_PE
|
#ifdef TE_PE
|
||||||
/* If the .linkonce pseudo-op was used for this section, we must
|
/* If the .linkonce pseudo-op was used for this section, we must
|
||||||
store the information in the auxiliary entry for the section
|
store the information in the auxiliary entry for the section
|
||||||
@ -3770,7 +3776,7 @@ obj_coff_lcomm (ignore)
|
|||||||
subseg_set (SEG_E2, 1);
|
subseg_set (SEG_E2, 1);
|
||||||
symbolP->sy_frag = frag_now;
|
symbolP->sy_frag = frag_now;
|
||||||
p = frag_var(rs_org, 1, 1, (relax_substateT)0, symbolP,
|
p = frag_var(rs_org, 1, 1, (relax_substateT)0, symbolP,
|
||||||
temp, (char *)0);
|
(offsetT) temp, (char *) 0);
|
||||||
*p = 0;
|
*p = 0;
|
||||||
subseg_set (current_seg, current_subseg); /* restore current seg */
|
subseg_set (current_seg, current_subseg); /* restore current seg */
|
||||||
S_SET_SEGMENT(symbolP, SEG_E2);
|
S_SET_SEGMENT(symbolP, SEG_E2);
|
||||||
@ -4046,11 +4052,21 @@ fixup_segment (segP, this_segment_type)
|
|||||||
|
|
||||||
add_number += S_GET_VALUE (add_symbolP);
|
add_number += S_GET_VALUE (add_symbolP);
|
||||||
add_number -= md_pcrel_from (fixP);
|
add_number -= md_pcrel_from (fixP);
|
||||||
#if defined (TC_I386) || defined (TE_LYNX)
|
|
||||||
/* On the 386 we must adjust by the segment vaddr as
|
/* We used to do
|
||||||
well. Ian Taylor. */
|
|
||||||
add_number -= segP->scnhdr.s_vaddr;
|
add_number -= segP->scnhdr.s_vaddr;
|
||||||
#endif
|
if defined (TC_I386) || defined (TE_LYNX). I now
|
||||||
|
think that was an error propagated from the case when
|
||||||
|
we are going to emit the relocation. If we are not
|
||||||
|
going to emit the relocation, then we just want to
|
||||||
|
set add_number to the difference between the symbols.
|
||||||
|
This is a case that would only arise when there is a
|
||||||
|
PC relative reference from a section other than .text
|
||||||
|
to a symbol defined in the same section, and the
|
||||||
|
reference is not relaxed. Since jump instructions on
|
||||||
|
the i386 are relaxed, this could only arise with a
|
||||||
|
call instruction. */
|
||||||
|
|
||||||
pcrel = 0; /* Lie. Don't want further pcrel processing. */
|
pcrel = 0; /* Lie. Don't want further pcrel processing. */
|
||||||
if (!TC_FORCE_RELOCATION (fixP))
|
if (!TC_FORCE_RELOCATION (fixP))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user