mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-16 12:24:19 +08:00
SEC_BLOCK, SEC_CLINK, and C_STATLAB added (TI COFF support).
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2000-04-06 Timothy Wall <twall@cygnus.com>
|
||||||
|
|
||||||
|
* coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
|
||||||
|
class. Handle SEC_CLINK and SEC_BLOCK flags.
|
||||||
|
* section.c: Add SEC_CLINK and SEC_BLOCK flags.
|
||||||
|
* bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
|
||||||
|
|
||||||
2000-04-06 Nick Clifton <nickc@cygnus.com>
|
2000-04-06 Nick Clifton <nickc@cygnus.com>
|
||||||
|
|
||||||
* elf32-arm.h (elf32_arm_set_private_flags): Only check for
|
* elf32-arm.h (elf32_arm_set_private_flags): Only check for
|
||||||
|
@ -1057,6 +1057,16 @@ typedef struct sec
|
|||||||
executables or shared objects. */
|
executables or shared objects. */
|
||||||
#define SEC_SHARED 0x4000000
|
#define SEC_SHARED 0x4000000
|
||||||
|
|
||||||
|
/* When a section with this flag is being linked, then if the size of
|
||||||
|
the input section is less than a page, it should not cross a page
|
||||||
|
boundary. If the size of the input section is one page or more, it
|
||||||
|
should be aligned on a page boundary. */
|
||||||
|
#define SEC_BLOCK 0x8000000
|
||||||
|
|
||||||
|
/* Conditionally link this section; do not link if there are no
|
||||||
|
references found to any symbol in the section. */
|
||||||
|
#define SEC_CLINK 0x10000000
|
||||||
|
|
||||||
/* End of section flags. */
|
/* End of section flags. */
|
||||||
|
|
||||||
/* Some internal packed boolean fields. */
|
/* Some internal packed boolean fields. */
|
||||||
|
@ -436,6 +436,16 @@ sec_to_styp_flags (sec_name, sec_flags)
|
|||||||
styp_flags = STYP_BSS;
|
styp_flags = STYP_BSS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef STYP_CLINK
|
||||||
|
if (sec_flags & SEC_CLINK)
|
||||||
|
styp_flags |= STYP_CLINK;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef STYP_BLOCK
|
||||||
|
if (sec_flags & SEC_BLOCK)
|
||||||
|
styp_flags |= STYP_BLOCK;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef STYP_NOLOAD
|
#ifdef STYP_NOLOAD
|
||||||
if ((sec_flags & (SEC_NEVER_LOAD | SEC_COFF_SHARED_LIBRARY)) != 0)
|
if ((sec_flags & (SEC_NEVER_LOAD | SEC_COFF_SHARED_LIBRARY)) != 0)
|
||||||
styp_flags |= STYP_NOLOAD;
|
styp_flags |= STYP_NOLOAD;
|
||||||
@ -533,6 +543,16 @@ styp_to_sec_flags (abfd, hdr, name, section)
|
|||||||
long styp_flags = internal_s->s_flags;
|
long styp_flags = internal_s->s_flags;
|
||||||
flagword sec_flags = 0;
|
flagword sec_flags = 0;
|
||||||
|
|
||||||
|
#ifdef STYP_BLOCK
|
||||||
|
if (styp_flags & STYP_BLOCK)
|
||||||
|
sec_flags |= SEC_BLOCK;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef STYP_CLINK
|
||||||
|
if (styp_flags & STYP_CLINK)
|
||||||
|
sec_flags |= SEC_CLINK;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef STYP_NOLOAD
|
#ifdef STYP_NOLOAD
|
||||||
if (styp_flags & STYP_NOLOAD)
|
if (styp_flags & STYP_NOLOAD)
|
||||||
{
|
{
|
||||||
@ -4304,6 +4324,11 @@ coff_slurp_symbol_table (abfd)
|
|||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case C_STATLAB: /* Static load time label */
|
||||||
|
dst->symbol.value = src->u.syment.n_value;
|
||||||
|
dst->symbol.flags = BSF_GLOBAL;
|
||||||
|
break;
|
||||||
|
|
||||||
case C_NULL:
|
case C_NULL:
|
||||||
/* PE DLLs sometimes have zeroed out symbols for some
|
/* PE DLLs sometimes have zeroed out symbols for some
|
||||||
reason. Just ignore them without a warning. */
|
reason. Just ignore them without a warning. */
|
||||||
@ -4326,7 +4351,6 @@ coff_slurp_symbol_table (abfd)
|
|||||||
#ifdef TIC80COFF
|
#ifdef TIC80COFF
|
||||||
case C_UEXT: /* Tentative external definition */
|
case C_UEXT: /* Tentative external definition */
|
||||||
#endif
|
#endif
|
||||||
case C_STATLAB: /* Static load time label */
|
|
||||||
case C_EXTLAB: /* External load time label */
|
case C_EXTLAB: /* External load time label */
|
||||||
case C_HIDDEN: /* ext symbol in dmert public lib */
|
case C_HIDDEN: /* ext symbol in dmert public lib */
|
||||||
default:
|
default:
|
||||||
|
@ -608,8 +608,11 @@ fixup_symbol_value (abfd, coff_symbol_ptr, syment)
|
|||||||
syment->n_value = (coff_symbol_ptr->symbol.value
|
syment->n_value = (coff_symbol_ptr->symbol.value
|
||||||
+ coff_symbol_ptr->symbol.section->output_offset);
|
+ coff_symbol_ptr->symbol.section->output_offset);
|
||||||
if (! obj_pe (abfd))
|
if (! obj_pe (abfd))
|
||||||
syment->n_value +=
|
{
|
||||||
coff_symbol_ptr->symbol.section->output_section->vma;
|
syment->n_value += (syment->n_sclass == C_STATLAB)
|
||||||
|
? coff_symbol_ptr->symbol.section->output_section->lma
|
||||||
|
: coff_symbol_ptr->symbol.section->output_section->vma;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -336,6 +336,16 @@ CODE_FRAGMENT
|
|||||||
. executables or shared objects. *}
|
. executables or shared objects. *}
|
||||||
.#define SEC_SHARED 0x4000000
|
.#define SEC_SHARED 0x4000000
|
||||||
.
|
.
|
||||||
|
. {* When a section with this flag is being linked, then if the size of
|
||||||
|
. the input section is less than a page, it should not cross a page
|
||||||
|
. boundary. If the size of the input section is one page or more, it
|
||||||
|
. should be aligned on a page boundary. *}
|
||||||
|
.#define SEC_BLOCK 0x8000000
|
||||||
|
.
|
||||||
|
. {* Conditionally link this section; do not link if there are no
|
||||||
|
. references found to any symbol in the section. *}
|
||||||
|
.#define SEC_CLINK 0x10000000
|
||||||
|
.
|
||||||
. {* End of section flags. *}
|
. {* End of section flags. *}
|
||||||
.
|
.
|
||||||
. {* Some internal packed boolean fields. *}
|
. {* Some internal packed boolean fields. *}
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2000-04-06 Timothy Wall <twall@cygnus.com>
|
||||||
|
|
||||||
|
* objdump.c (dump_section_header): Print CLINK and BLOCK flags.
|
||||||
|
|
||||||
2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
|
2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
|
||||||
|
|
||||||
* readelf.c (decode_location_expression): Loop through multiple
|
* readelf.c (decode_location_expression): Loop through multiple
|
||||||
|
@ -376,6 +376,8 @@ dump_section_header (abfd, section, ignored)
|
|||||||
PF (SEC_NEVER_LOAD, "NEVER_LOAD");
|
PF (SEC_NEVER_LOAD, "NEVER_LOAD");
|
||||||
PF (SEC_EXCLUDE, "EXCLUDE");
|
PF (SEC_EXCLUDE, "EXCLUDE");
|
||||||
PF (SEC_SORT_ENTRIES, "SORT_ENTRIES");
|
PF (SEC_SORT_ENTRIES, "SORT_ENTRIES");
|
||||||
|
PF (SEC_BLOCK, "BLOCK");
|
||||||
|
PF (SEC_CLINK, "CLINK");
|
||||||
PF (SEC_SMALL_DATA, "SMALL_DATA");
|
PF (SEC_SMALL_DATA, "SMALL_DATA");
|
||||||
PF (SEC_SHARED, "SHARED");
|
PF (SEC_SHARED, "SHARED");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user