mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-18 13:23:10 +08:00
Fri Jun 30 16:07:18 1995 Steve Chamberlain <sac@slash.cygnus.com>
* cofflink.c (_bfd_coff_generic_relocate_section): Compare the full text of .reloc or .edata section names.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Fri Jun 30 16:07:18 1995 Steve Chamberlain <sac@slash.cygnus.com>
|
||||||
|
|
||||||
|
* cofflink.c (_bfd_coff_generic_relocate_section): Compare
|
||||||
|
the full text of .reloc or .edata section names.
|
||||||
|
|
||||||
Fri Jun 30 15:47:37 1995 Fred Fish <fnf@deneb.cygnus.com>
|
Fri Jun 30 15:47:37 1995 Fred Fish <fnf@deneb.cygnus.com>
|
||||||
|
|
||||||
* cofflink.c (_bfd_coff_generic_relocate_section):
|
* cofflink.c (_bfd_coff_generic_relocate_section):
|
||||||
|
@ -2305,16 +2305,15 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
|
|||||||
+ sec->output_offset
|
+ sec->output_offset
|
||||||
+ sym->n_value
|
+ sym->n_value
|
||||||
- sec->vma);
|
- sec->vma);
|
||||||
if (obj_pe(output_bfd)) {
|
if (obj_pe (output_bfd))
|
||||||
/* Make a correction here to val if the sec is either .rsrc
|
{
|
||||||
or .idata */
|
/* Make a correction here to val if the sec is either .rsrc$nnn
|
||||||
|
or .idata$nnn or reloc or edata */
|
||||||
if (strcmp (input_section->name, ".text") != 0)
|
if (strcmp (input_section->name, ".text") != 0)
|
||||||
{
|
{
|
||||||
if (strncmp (sec->name, ".idata$", 7) == 0)
|
if (strncmp (sec->name, ".idata$", 7) == 0
|
||||||
val -= NT_IMAGE_BASE;
|
|| strcmp (sec->name, ".reloc") == 0
|
||||||
if (strncmp (sec->name, ".reloc", 6) == 0)
|
|| strcmp (sec->name, ".edata") == 0)
|
||||||
val -= NT_IMAGE_BASE;
|
|
||||||
else if (strncmp (sec->name, ".edata", 5) == 0)
|
|
||||||
val -= NT_IMAGE_BASE;
|
val -= NT_IMAGE_BASE;
|
||||||
else if (strncmp (sec->name, ".rsrc$", 6) == 0)
|
else if (strncmp (sec->name, ".rsrc$", 6) == 0)
|
||||||
{
|
{
|
||||||
@ -2337,15 +2336,13 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
|
|||||||
+ sec->output_section->vma
|
+ sec->output_section->vma
|
||||||
+ sec->output_offset);
|
+ sec->output_offset);
|
||||||
if (obj_pe (output_bfd)) {
|
if (obj_pe (output_bfd)) {
|
||||||
/* Make a correction here to val if the sec is either .rsrc
|
/* Make a correction here to val if the sec is either .rsrc$nnn
|
||||||
or .idata */
|
or .idata$nnnn or reloc or edata. */
|
||||||
if (strcmp (input_section->name, ".text") != 0)
|
if (strcmp (input_section->name, ".text") != 0)
|
||||||
{
|
{
|
||||||
if (strncmp (sec->name, ".idata$", 7) == 0)
|
if (strncmp (sec->name, ".idata$", 7) == 0
|
||||||
val -= NT_IMAGE_BASE;
|
|| strcmp (sec->name, ".reloc") == 0
|
||||||
else if (strncmp (sec->name, ".reloc", 5) == 0)
|
|| strcmp (sec->name, ".edata") == 0)
|
||||||
val -= NT_IMAGE_BASE;
|
|
||||||
else if (strncmp (sec->name, ".edata", 5) == 0)
|
|
||||||
val -= NT_IMAGE_BASE;
|
val -= NT_IMAGE_BASE;
|
||||||
else if (strncmp (sec->name, ".rsrc$", 6) == 0)
|
else if (strncmp (sec->name, ".rsrc$", 6) == 0)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user