mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-27 14:00:30 +00:00
bfd/
2005-02-21 H.J. Lu <hongjiu.lu@intel.com> * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK. Replace SEC_SHARED with SEC_COFF_SHARED. (styp_to_sec_flags): Likewise. * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0. (TARGET_LITTLE_SYM): Likewise. * section.c (SEC_ARCH_BIT_0): Removed. (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE. (SEC_SHARED): Renamed to ... (SEC_COFF_SHARED): This. (SEC_BLOCK): Renamed to ... (SEC_TIC54X_BLOCK): This. (SEC_CLINK): Renamed to ... (SEC_TIC54X_CLINK): This. (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY, SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the end. * bfd-in2.h: Regenerated. binutils/ 2005-02-21 H.J. Lu <hongjiu.lu@intel.com> * objcopy.c (parse_flags): Replace SEC_SHARED with SEC_COFF_SHARED. * objdump.c (dump_section_header): Dump SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK for TI c54x only. Remove SEC_ARCH_BIT_0. Dump SEC_COFF_SHARED for COFF only. gas/ 2005-02-21 H.J. Lu <hongjiu.lu@intel.com> * config/obj-coff.c (obj_coff_section): Replace SEC_SHARED with SEC_COFF_SHARED. * config/tc-tic54x.c (tic54x_bss): Replace SEC_BLOCK with SEC_TIC54X_BLOCK. (demand_empty_rest_of_line): Likewise. (tic54x_sblock): Likewise. (tic54x_clink): Replace with SEC_CLINK with SEC_TIC54X_CLINK. ld/ 2005-02-21 H.J. Lu <hongjiu.lu@intel.com> * ldlang.c (lang_add_section): Check SEC_TIC54X_BLOCK for TI tic54x input only. (lang_size_sections_1): Check SEC_COFF_SHARED_LIBRARY for COFF and ECOFF output only.
This commit is contained in:
parent
610ad19b95
commit
ebe372c1dd
@ -1,3 +1,27 @@
|
|||||||
|
2005-02-21 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
|
||||||
|
SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
|
||||||
|
Replace SEC_SHARED with SEC_COFF_SHARED.
|
||||||
|
(styp_to_sec_flags): Likewise.
|
||||||
|
|
||||||
|
* elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
|
||||||
|
(TARGET_LITTLE_SYM): Likewise.
|
||||||
|
|
||||||
|
* section.c (SEC_ARCH_BIT_0): Removed.
|
||||||
|
(SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
|
||||||
|
SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
|
||||||
|
(SEC_SHARED): Renamed to ...
|
||||||
|
(SEC_COFF_SHARED): This.
|
||||||
|
(SEC_BLOCK): Renamed to ...
|
||||||
|
(SEC_TIC54X_BLOCK): This.
|
||||||
|
(SEC_CLINK): Renamed to ...
|
||||||
|
(SEC_TIC54X_CLINK): This.
|
||||||
|
(SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
|
||||||
|
SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
|
||||||
|
end.
|
||||||
|
* bfd-in2.h: Regenerated.
|
||||||
|
|
||||||
2005-02-21 Fred Fish <fnf@specifixinc.com>
|
2005-02-21 Fred Fish <fnf@specifixinc.com>
|
||||||
|
|
||||||
* dwarf2.c (find_abstract_instance_name): Call recursively
|
* dwarf2.c (find_abstract_instance_name): Call recursively
|
||||||
|
225
bfd/bfd-in2.h
225
bfd/bfd-in2.h
@ -1075,23 +1075,17 @@ typedef struct bfd_section
|
|||||||
some relocation information too. */
|
some relocation information too. */
|
||||||
#define SEC_RELOC 0x004
|
#define SEC_RELOC 0x004
|
||||||
|
|
||||||
/* ELF reserves 4 processor specific bits and 8 operating system
|
|
||||||
specific bits in sh_flags; at present we can get away with just
|
|
||||||
one in communicating between the assembler and BFD, but this
|
|
||||||
isn't a good long-term solution. */
|
|
||||||
#define SEC_ARCH_BIT_0 0x008
|
|
||||||
|
|
||||||
/* A signal to the OS that the section contains read only data. */
|
/* A signal to the OS that the section contains read only data. */
|
||||||
#define SEC_READONLY 0x010
|
#define SEC_READONLY 0x008
|
||||||
|
|
||||||
/* The section contains code only. */
|
/* The section contains code only. */
|
||||||
#define SEC_CODE 0x020
|
#define SEC_CODE 0x010
|
||||||
|
|
||||||
/* The section contains data only. */
|
/* The section contains data only. */
|
||||||
#define SEC_DATA 0x040
|
#define SEC_DATA 0x020
|
||||||
|
|
||||||
/* The section will reside in ROM. */
|
/* The section will reside in ROM. */
|
||||||
#define SEC_ROM 0x080
|
#define SEC_ROM 0x040
|
||||||
|
|
||||||
/* The section contains constructor information. This section
|
/* The section contains constructor information. This section
|
||||||
type is used by the linker to create lists of constructors and
|
type is used by the linker to create lists of constructors and
|
||||||
@ -1103,16 +1097,110 @@ typedef struct bfd_section
|
|||||||
sections called <<__CTOR_LIST__>> and relocate the data
|
sections called <<__CTOR_LIST__>> and relocate the data
|
||||||
contained within - exactly the operations it would peform on
|
contained within - exactly the operations it would peform on
|
||||||
standard data. */
|
standard data. */
|
||||||
#define SEC_CONSTRUCTOR 0x100
|
#define SEC_CONSTRUCTOR 0x080
|
||||||
|
|
||||||
/* The section has contents - a data section could be
|
/* The section has contents - a data section could be
|
||||||
<<SEC_ALLOC>> | <<SEC_HAS_CONTENTS>>; a debug section could be
|
<<SEC_ALLOC>> | <<SEC_HAS_CONTENTS>>; a debug section could be
|
||||||
<<SEC_HAS_CONTENTS>> */
|
<<SEC_HAS_CONTENTS>> */
|
||||||
#define SEC_HAS_CONTENTS 0x200
|
#define SEC_HAS_CONTENTS 0x100
|
||||||
|
|
||||||
/* An instruction to the linker to not output the section
|
/* An instruction to the linker to not output the section
|
||||||
even if it has information which would normally be written. */
|
even if it has information which would normally be written. */
|
||||||
#define SEC_NEVER_LOAD 0x400
|
#define SEC_NEVER_LOAD 0x200
|
||||||
|
|
||||||
|
/* The section contains thread local data. */
|
||||||
|
#define SEC_THREAD_LOCAL 0x400
|
||||||
|
|
||||||
|
/* The section has GOT references. This flag is only for the
|
||||||
|
linker, and is currently only used by the elf32-hppa back end.
|
||||||
|
It will be set if global offset table references were detected
|
||||||
|
in this section, which indicate to the linker that the section
|
||||||
|
contains PIC code, and must be handled specially when doing a
|
||||||
|
static link. */
|
||||||
|
#define SEC_HAS_GOT_REF 0x800
|
||||||
|
|
||||||
|
/* The section contains common symbols (symbols may be defined
|
||||||
|
multiple times, the value of a symbol is the amount of
|
||||||
|
space it requires, and the largest symbol value is the one
|
||||||
|
used). Most targets have exactly one of these (which we
|
||||||
|
translate to bfd_com_section_ptr), but ECOFF has two. */
|
||||||
|
#define SEC_IS_COMMON 0x1000
|
||||||
|
|
||||||
|
/* The section contains only debugging information. For
|
||||||
|
example, this is set for ELF .debug and .stab sections.
|
||||||
|
strip tests this flag to see if a section can be
|
||||||
|
discarded. */
|
||||||
|
#define SEC_DEBUGGING 0x2000
|
||||||
|
|
||||||
|
/* The contents of this section are held in memory pointed to
|
||||||
|
by the contents field. This is checked by bfd_get_section_contents,
|
||||||
|
and the data is retrieved from memory if appropriate. */
|
||||||
|
#define SEC_IN_MEMORY 0x4000
|
||||||
|
|
||||||
|
/* The contents of this section are to be excluded by the
|
||||||
|
linker for executable and shared objects unless those
|
||||||
|
objects are to be further relocated. */
|
||||||
|
#define SEC_EXCLUDE 0x8000
|
||||||
|
|
||||||
|
/* The contents of this section are to be sorted based on the sum of
|
||||||
|
the symbol and addend values specified by the associated relocation
|
||||||
|
entries. Entries without associated relocation entries will be
|
||||||
|
appended to the end of the section in an unspecified order. */
|
||||||
|
#define SEC_SORT_ENTRIES 0x10000
|
||||||
|
|
||||||
|
/* When linking, duplicate sections of the same name should be
|
||||||
|
discarded, rather than being combined into a single section as
|
||||||
|
is usually done. This is similar to how common symbols are
|
||||||
|
handled. See SEC_LINK_DUPLICATES below. */
|
||||||
|
#define SEC_LINK_ONCE 0x20000
|
||||||
|
|
||||||
|
/* If SEC_LINK_ONCE is set, this bitfield describes how the linker
|
||||||
|
should handle duplicate sections. */
|
||||||
|
#define SEC_LINK_DUPLICATES 0x40000
|
||||||
|
|
||||||
|
/* This value for SEC_LINK_DUPLICATES means that duplicate
|
||||||
|
sections with the same name should simply be discarded. */
|
||||||
|
#define SEC_LINK_DUPLICATES_DISCARD 0x0
|
||||||
|
|
||||||
|
/* This value for SEC_LINK_DUPLICATES means that the linker
|
||||||
|
should warn if there are any duplicate sections, although
|
||||||
|
it should still only link one copy. */
|
||||||
|
#define SEC_LINK_DUPLICATES_ONE_ONLY 0x80000
|
||||||
|
|
||||||
|
/* This value for SEC_LINK_DUPLICATES means that the linker
|
||||||
|
should warn if any duplicate sections are a different size. */
|
||||||
|
#define SEC_LINK_DUPLICATES_SAME_SIZE 0x100000
|
||||||
|
|
||||||
|
/* This value for SEC_LINK_DUPLICATES means that the linker
|
||||||
|
should warn if any duplicate sections contain different
|
||||||
|
contents. */
|
||||||
|
#define SEC_LINK_DUPLICATES_SAME_CONTENTS \
|
||||||
|
(SEC_LINK_DUPLICATES_ONE_ONLY | SEC_LINK_DUPLICATES_SAME_SIZE)
|
||||||
|
|
||||||
|
/* This section was created by the linker as part of dynamic
|
||||||
|
relocation or other arcane processing. It is skipped when
|
||||||
|
going through the first-pass output, trusting that someone
|
||||||
|
else up the line will take care of it later. */
|
||||||
|
#define SEC_LINKER_CREATED 0x200000
|
||||||
|
|
||||||
|
/* This section should not be subject to garbage collection. */
|
||||||
|
#define SEC_KEEP 0x400000
|
||||||
|
|
||||||
|
/* This section contains "short" data, and should be placed
|
||||||
|
"near" the GP. */
|
||||||
|
#define SEC_SMALL_DATA 0x800000
|
||||||
|
|
||||||
|
/* Attempt to merge identical entities in the section.
|
||||||
|
Entity size is given in the entsize field. */
|
||||||
|
#define SEC_MERGE 0x1000000
|
||||||
|
|
||||||
|
/* If given with SEC_MERGE, entities to merge are zero terminated
|
||||||
|
strings where entsize specifies character size instead of fixed
|
||||||
|
size entries. */
|
||||||
|
#define SEC_STRINGS 0x2000000
|
||||||
|
|
||||||
|
/* This section contains data about section groups. */
|
||||||
|
#define SEC_GROUP 0x4000000
|
||||||
|
|
||||||
/* The section is a COFF shared library section. This flag is
|
/* The section is a COFF shared library section. This flag is
|
||||||
only for the linker. If this type of section appears in
|
only for the linker. If this type of section appears in
|
||||||
@ -1123,114 +1211,23 @@ typedef struct bfd_section
|
|||||||
might be cleaner to have some more general mechanism to
|
might be cleaner to have some more general mechanism to
|
||||||
allow the back end to control what the linker does with
|
allow the back end to control what the linker does with
|
||||||
sections. */
|
sections. */
|
||||||
#define SEC_COFF_SHARED_LIBRARY 0x800
|
#define SEC_COFF_SHARED_LIBRARY 0x10000000
|
||||||
|
|
||||||
/* The section contains thread local data. */
|
|
||||||
#define SEC_THREAD_LOCAL 0x1000
|
|
||||||
|
|
||||||
/* The section has GOT references. This flag is only for the
|
|
||||||
linker, and is currently only used by the elf32-hppa back end.
|
|
||||||
It will be set if global offset table references were detected
|
|
||||||
in this section, which indicate to the linker that the section
|
|
||||||
contains PIC code, and must be handled specially when doing a
|
|
||||||
static link. */
|
|
||||||
#define SEC_HAS_GOT_REF 0x4000
|
|
||||||
|
|
||||||
/* The section contains common symbols (symbols may be defined
|
|
||||||
multiple times, the value of a symbol is the amount of
|
|
||||||
space it requires, and the largest symbol value is the one
|
|
||||||
used). Most targets have exactly one of these (which we
|
|
||||||
translate to bfd_com_section_ptr), but ECOFF has two. */
|
|
||||||
#define SEC_IS_COMMON 0x8000
|
|
||||||
|
|
||||||
/* The section contains only debugging information. For
|
|
||||||
example, this is set for ELF .debug and .stab sections.
|
|
||||||
strip tests this flag to see if a section can be
|
|
||||||
discarded. */
|
|
||||||
#define SEC_DEBUGGING 0x10000
|
|
||||||
|
|
||||||
/* The contents of this section are held in memory pointed to
|
|
||||||
by the contents field. This is checked by bfd_get_section_contents,
|
|
||||||
and the data is retrieved from memory if appropriate. */
|
|
||||||
#define SEC_IN_MEMORY 0x20000
|
|
||||||
|
|
||||||
/* The contents of this section are to be excluded by the
|
|
||||||
linker for executable and shared objects unless those
|
|
||||||
objects are to be further relocated. */
|
|
||||||
#define SEC_EXCLUDE 0x40000
|
|
||||||
|
|
||||||
/* The contents of this section are to be sorted based on the sum of
|
|
||||||
the symbol and addend values specified by the associated relocation
|
|
||||||
entries. Entries without associated relocation entries will be
|
|
||||||
appended to the end of the section in an unspecified order. */
|
|
||||||
#define SEC_SORT_ENTRIES 0x80000
|
|
||||||
|
|
||||||
/* When linking, duplicate sections of the same name should be
|
|
||||||
discarded, rather than being combined into a single section as
|
|
||||||
is usually done. This is similar to how common symbols are
|
|
||||||
handled. See SEC_LINK_DUPLICATES below. */
|
|
||||||
#define SEC_LINK_ONCE 0x100000
|
|
||||||
|
|
||||||
/* If SEC_LINK_ONCE is set, this bitfield describes how the linker
|
|
||||||
should handle duplicate sections. */
|
|
||||||
#define SEC_LINK_DUPLICATES 0x600000
|
|
||||||
|
|
||||||
/* This value for SEC_LINK_DUPLICATES means that duplicate
|
|
||||||
sections with the same name should simply be discarded. */
|
|
||||||
#define SEC_LINK_DUPLICATES_DISCARD 0x0
|
|
||||||
|
|
||||||
/* This value for SEC_LINK_DUPLICATES means that the linker
|
|
||||||
should warn if there are any duplicate sections, although
|
|
||||||
it should still only link one copy. */
|
|
||||||
#define SEC_LINK_DUPLICATES_ONE_ONLY 0x200000
|
|
||||||
|
|
||||||
/* This value for SEC_LINK_DUPLICATES means that the linker
|
|
||||||
should warn if any duplicate sections are a different size. */
|
|
||||||
#define SEC_LINK_DUPLICATES_SAME_SIZE 0x400000
|
|
||||||
|
|
||||||
/* This value for SEC_LINK_DUPLICATES means that the linker
|
|
||||||
should warn if any duplicate sections contain different
|
|
||||||
contents. */
|
|
||||||
#define SEC_LINK_DUPLICATES_SAME_CONTENTS 0x600000
|
|
||||||
|
|
||||||
/* This section was created by the linker as part of dynamic
|
|
||||||
relocation or other arcane processing. It is skipped when
|
|
||||||
going through the first-pass output, trusting that someone
|
|
||||||
else up the line will take care of it later. */
|
|
||||||
#define SEC_LINKER_CREATED 0x800000
|
|
||||||
|
|
||||||
/* This section should not be subject to garbage collection. */
|
|
||||||
#define SEC_KEEP 0x1000000
|
|
||||||
|
|
||||||
/* This section contains "short" data, and should be placed
|
|
||||||
"near" the GP. */
|
|
||||||
#define SEC_SMALL_DATA 0x2000000
|
|
||||||
|
|
||||||
/* This section contains data which may be shared with other
|
/* This section contains data which may be shared with other
|
||||||
executables or shared objects. */
|
executables or shared objects. This is for COFF only. */
|
||||||
#define SEC_SHARED 0x4000000
|
#define SEC_COFF_SHARED 0x20000000
|
||||||
|
|
||||||
/* When a section with this flag is being linked, then if the size of
|
/* 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
|
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
|
boundary. If the size of the input section is one page or more,
|
||||||
should be aligned on a page boundary. */
|
it should be aligned on a page boundary. This is for TI
|
||||||
#define SEC_BLOCK 0x8000000
|
TMS320C54X only. */
|
||||||
|
#define SEC_TIC54X_BLOCK 0x40000000
|
||||||
|
|
||||||
/* Conditionally link this section; do not link if there are no
|
/* Conditionally link this section; do not link if there are no
|
||||||
references found to any symbol in the section. */
|
references found to any symbol in the section. This is for TI
|
||||||
#define SEC_CLINK 0x10000000
|
TMS320C54X only. */
|
||||||
|
#define SEC_TIC54X_CLINK 0x80000000
|
||||||
/* Attempt to merge identical entities in the section.
|
|
||||||
Entity size is given in the entsize field. */
|
|
||||||
#define SEC_MERGE 0x20000000
|
|
||||||
|
|
||||||
/* If given with SEC_MERGE, entities to merge are zero terminated
|
|
||||||
strings where entsize specifies character size instead of fixed
|
|
||||||
size entries. */
|
|
||||||
#define SEC_STRINGS 0x40000000
|
|
||||||
|
|
||||||
/* This section contains data about section groups. */
|
|
||||||
#define SEC_GROUP 0x80000000
|
|
||||||
|
|
||||||
/* End of section flags. */
|
/* End of section flags. */
|
||||||
|
|
||||||
|
@ -494,12 +494,12 @@ sec_to_styp_flags (sec_name, sec_flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef STYP_CLINK
|
#ifdef STYP_CLINK
|
||||||
if (sec_flags & SEC_CLINK)
|
if (sec_flags & SEC_TIC54X_CLINK)
|
||||||
styp_flags |= STYP_CLINK;
|
styp_flags |= STYP_CLINK;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef STYP_BLOCK
|
#ifdef STYP_BLOCK
|
||||||
if (sec_flags & SEC_BLOCK)
|
if (sec_flags & SEC_TIC54X_BLOCK)
|
||||||
styp_flags |= STYP_BLOCK;
|
styp_flags |= STYP_BLOCK;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -579,7 +579,7 @@ sec_to_styp_flags (sec_name, sec_flags)
|
|||||||
styp_flags |= IMAGE_SCN_MEM_WRITE; /* Invert READONLY for write. */
|
styp_flags |= IMAGE_SCN_MEM_WRITE; /* Invert READONLY for write. */
|
||||||
if (sec_flags & SEC_CODE)
|
if (sec_flags & SEC_CODE)
|
||||||
styp_flags |= IMAGE_SCN_MEM_EXECUTE; /* CODE->EXECUTE. */
|
styp_flags |= IMAGE_SCN_MEM_EXECUTE; /* CODE->EXECUTE. */
|
||||||
if (sec_flags & SEC_SHARED)
|
if (sec_flags & SEC_COFF_SHARED)
|
||||||
styp_flags |= IMAGE_SCN_MEM_SHARED; /* Shared remains meaningful. */
|
styp_flags |= IMAGE_SCN_MEM_SHARED; /* Shared remains meaningful. */
|
||||||
|
|
||||||
return styp_flags;
|
return styp_flags;
|
||||||
@ -608,12 +608,12 @@ styp_to_sec_flags (abfd, hdr, name, section, flags_ptr)
|
|||||||
|
|
||||||
#ifdef STYP_BLOCK
|
#ifdef STYP_BLOCK
|
||||||
if (styp_flags & STYP_BLOCK)
|
if (styp_flags & STYP_BLOCK)
|
||||||
sec_flags |= SEC_BLOCK;
|
sec_flags |= SEC_TIC54X_BLOCK;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef STYP_CLINK
|
#ifdef STYP_CLINK
|
||||||
if (styp_flags & STYP_CLINK)
|
if (styp_flags & STYP_CLINK)
|
||||||
sec_flags |= SEC_CLINK;
|
sec_flags |= SEC_TIC54X_CLINK;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef STYP_NOLOAD
|
#ifdef STYP_NOLOAD
|
||||||
@ -1086,7 +1086,7 @@ styp_to_sec_flags (abfd, hdr, name, section, flags_ptr)
|
|||||||
sec_flags |= SEC_DEBUGGING;
|
sec_flags |= SEC_DEBUGGING;
|
||||||
break;
|
break;
|
||||||
case IMAGE_SCN_MEM_SHARED:
|
case IMAGE_SCN_MEM_SHARED:
|
||||||
sec_flags |= SEC_SHARED;
|
sec_flags |= SEC_COFF_SHARED;
|
||||||
break;
|
break;
|
||||||
case IMAGE_SCN_LNK_REMOVE:
|
case IMAGE_SCN_LNK_REMOVE:
|
||||||
sec_flags |= SEC_EXCLUDE;
|
sec_flags |= SEC_EXCLUDE;
|
||||||
|
@ -641,7 +641,7 @@ const bfd_target TARGET_BIG_SYM =
|
|||||||
/* section_flags: mask of all section flags */
|
/* section_flags: mask of all section flags */
|
||||||
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
|
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
|
||||||
| SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES
|
| SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES
|
||||||
| SEC_ARCH_BIT_0 | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP),
|
| SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP),
|
||||||
|
|
||||||
/* leading_symbol_char: is the first char of a user symbol
|
/* leading_symbol_char: is the first char of a user symbol
|
||||||
predictable, and if so what is it */
|
predictable, and if so what is it */
|
||||||
@ -737,7 +737,7 @@ const bfd_target TARGET_LITTLE_SYM =
|
|||||||
/* section_flags: mask of all section flags */
|
/* section_flags: mask of all section flags */
|
||||||
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
|
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
|
||||||
| SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES
|
| SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES
|
||||||
| SEC_ARCH_BIT_0 | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP),
|
| SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP),
|
||||||
|
|
||||||
/* leading_symbol_char: is the first char of a user symbol
|
/* leading_symbol_char: is the first char of a user symbol
|
||||||
predictable, and if so what is it */
|
predictable, and if so what is it */
|
||||||
|
225
bfd/section.c
225
bfd/section.c
@ -183,23 +183,17 @@ CODE_FRAGMENT
|
|||||||
. some relocation information too. *}
|
. some relocation information too. *}
|
||||||
.#define SEC_RELOC 0x004
|
.#define SEC_RELOC 0x004
|
||||||
.
|
.
|
||||||
. {* ELF reserves 4 processor specific bits and 8 operating system
|
|
||||||
. specific bits in sh_flags; at present we can get away with just
|
|
||||||
. one in communicating between the assembler and BFD, but this
|
|
||||||
. isn't a good long-term solution. *}
|
|
||||||
.#define SEC_ARCH_BIT_0 0x008
|
|
||||||
.
|
|
||||||
. {* A signal to the OS that the section contains read only data. *}
|
. {* A signal to the OS that the section contains read only data. *}
|
||||||
.#define SEC_READONLY 0x010
|
.#define SEC_READONLY 0x008
|
||||||
.
|
.
|
||||||
. {* The section contains code only. *}
|
. {* The section contains code only. *}
|
||||||
.#define SEC_CODE 0x020
|
.#define SEC_CODE 0x010
|
||||||
.
|
.
|
||||||
. {* The section contains data only. *}
|
. {* The section contains data only. *}
|
||||||
.#define SEC_DATA 0x040
|
.#define SEC_DATA 0x020
|
||||||
.
|
.
|
||||||
. {* The section will reside in ROM. *}
|
. {* The section will reside in ROM. *}
|
||||||
.#define SEC_ROM 0x080
|
.#define SEC_ROM 0x040
|
||||||
.
|
.
|
||||||
. {* The section contains constructor information. This section
|
. {* The section contains constructor information. This section
|
||||||
. type is used by the linker to create lists of constructors and
|
. type is used by the linker to create lists of constructors and
|
||||||
@ -211,16 +205,110 @@ CODE_FRAGMENT
|
|||||||
. sections called <<__CTOR_LIST__>> and relocate the data
|
. sections called <<__CTOR_LIST__>> and relocate the data
|
||||||
. contained within - exactly the operations it would peform on
|
. contained within - exactly the operations it would peform on
|
||||||
. standard data. *}
|
. standard data. *}
|
||||||
.#define SEC_CONSTRUCTOR 0x100
|
.#define SEC_CONSTRUCTOR 0x080
|
||||||
.
|
.
|
||||||
. {* The section has contents - a data section could be
|
. {* The section has contents - a data section could be
|
||||||
. <<SEC_ALLOC>> | <<SEC_HAS_CONTENTS>>; a debug section could be
|
. <<SEC_ALLOC>> | <<SEC_HAS_CONTENTS>>; a debug section could be
|
||||||
. <<SEC_HAS_CONTENTS>> *}
|
. <<SEC_HAS_CONTENTS>> *}
|
||||||
.#define SEC_HAS_CONTENTS 0x200
|
.#define SEC_HAS_CONTENTS 0x100
|
||||||
.
|
.
|
||||||
. {* An instruction to the linker to not output the section
|
. {* An instruction to the linker to not output the section
|
||||||
. even if it has information which would normally be written. *}
|
. even if it has information which would normally be written. *}
|
||||||
.#define SEC_NEVER_LOAD 0x400
|
.#define SEC_NEVER_LOAD 0x200
|
||||||
|
.
|
||||||
|
. {* The section contains thread local data. *}
|
||||||
|
.#define SEC_THREAD_LOCAL 0x400
|
||||||
|
.
|
||||||
|
. {* The section has GOT references. This flag is only for the
|
||||||
|
. linker, and is currently only used by the elf32-hppa back end.
|
||||||
|
. It will be set if global offset table references were detected
|
||||||
|
. in this section, which indicate to the linker that the section
|
||||||
|
. contains PIC code, and must be handled specially when doing a
|
||||||
|
. static link. *}
|
||||||
|
.#define SEC_HAS_GOT_REF 0x800
|
||||||
|
.
|
||||||
|
. {* The section contains common symbols (symbols may be defined
|
||||||
|
. multiple times, the value of a symbol is the amount of
|
||||||
|
. space it requires, and the largest symbol value is the one
|
||||||
|
. used). Most targets have exactly one of these (which we
|
||||||
|
. translate to bfd_com_section_ptr), but ECOFF has two. *}
|
||||||
|
.#define SEC_IS_COMMON 0x1000
|
||||||
|
.
|
||||||
|
. {* The section contains only debugging information. For
|
||||||
|
. example, this is set for ELF .debug and .stab sections.
|
||||||
|
. strip tests this flag to see if a section can be
|
||||||
|
. discarded. *}
|
||||||
|
.#define SEC_DEBUGGING 0x2000
|
||||||
|
.
|
||||||
|
. {* The contents of this section are held in memory pointed to
|
||||||
|
. by the contents field. This is checked by bfd_get_section_contents,
|
||||||
|
. and the data is retrieved from memory if appropriate. *}
|
||||||
|
.#define SEC_IN_MEMORY 0x4000
|
||||||
|
.
|
||||||
|
. {* The contents of this section are to be excluded by the
|
||||||
|
. linker for executable and shared objects unless those
|
||||||
|
. objects are to be further relocated. *}
|
||||||
|
.#define SEC_EXCLUDE 0x8000
|
||||||
|
.
|
||||||
|
. {* The contents of this section are to be sorted based on the sum of
|
||||||
|
. the symbol and addend values specified by the associated relocation
|
||||||
|
. entries. Entries without associated relocation entries will be
|
||||||
|
. appended to the end of the section in an unspecified order. *}
|
||||||
|
.#define SEC_SORT_ENTRIES 0x10000
|
||||||
|
.
|
||||||
|
. {* When linking, duplicate sections of the same name should be
|
||||||
|
. discarded, rather than being combined into a single section as
|
||||||
|
. is usually done. This is similar to how common symbols are
|
||||||
|
. handled. See SEC_LINK_DUPLICATES below. *}
|
||||||
|
.#define SEC_LINK_ONCE 0x20000
|
||||||
|
.
|
||||||
|
. {* If SEC_LINK_ONCE is set, this bitfield describes how the linker
|
||||||
|
. should handle duplicate sections. *}
|
||||||
|
.#define SEC_LINK_DUPLICATES 0x40000
|
||||||
|
.
|
||||||
|
. {* This value for SEC_LINK_DUPLICATES means that duplicate
|
||||||
|
. sections with the same name should simply be discarded. *}
|
||||||
|
.#define SEC_LINK_DUPLICATES_DISCARD 0x0
|
||||||
|
.
|
||||||
|
. {* This value for SEC_LINK_DUPLICATES means that the linker
|
||||||
|
. should warn if there are any duplicate sections, although
|
||||||
|
. it should still only link one copy. *}
|
||||||
|
.#define SEC_LINK_DUPLICATES_ONE_ONLY 0x80000
|
||||||
|
.
|
||||||
|
. {* This value for SEC_LINK_DUPLICATES means that the linker
|
||||||
|
. should warn if any duplicate sections are a different size. *}
|
||||||
|
.#define SEC_LINK_DUPLICATES_SAME_SIZE 0x100000
|
||||||
|
.
|
||||||
|
. {* This value for SEC_LINK_DUPLICATES means that the linker
|
||||||
|
. should warn if any duplicate sections contain different
|
||||||
|
. contents. *}
|
||||||
|
.#define SEC_LINK_DUPLICATES_SAME_CONTENTS \
|
||||||
|
. (SEC_LINK_DUPLICATES_ONE_ONLY | SEC_LINK_DUPLICATES_SAME_SIZE)
|
||||||
|
.
|
||||||
|
. {* This section was created by the linker as part of dynamic
|
||||||
|
. relocation or other arcane processing. It is skipped when
|
||||||
|
. going through the first-pass output, trusting that someone
|
||||||
|
. else up the line will take care of it later. *}
|
||||||
|
.#define SEC_LINKER_CREATED 0x200000
|
||||||
|
.
|
||||||
|
. {* This section should not be subject to garbage collection. *}
|
||||||
|
.#define SEC_KEEP 0x400000
|
||||||
|
.
|
||||||
|
. {* This section contains "short" data, and should be placed
|
||||||
|
. "near" the GP. *}
|
||||||
|
.#define SEC_SMALL_DATA 0x800000
|
||||||
|
.
|
||||||
|
. {* Attempt to merge identical entities in the section.
|
||||||
|
. Entity size is given in the entsize field. *}
|
||||||
|
.#define SEC_MERGE 0x1000000
|
||||||
|
.
|
||||||
|
. {* If given with SEC_MERGE, entities to merge are zero terminated
|
||||||
|
. strings where entsize specifies character size instead of fixed
|
||||||
|
. size entries. *}
|
||||||
|
.#define SEC_STRINGS 0x2000000
|
||||||
|
.
|
||||||
|
. {* This section contains data about section groups. *}
|
||||||
|
.#define SEC_GROUP 0x4000000
|
||||||
.
|
.
|
||||||
. {* The section is a COFF shared library section. This flag is
|
. {* The section is a COFF shared library section. This flag is
|
||||||
. only for the linker. If this type of section appears in
|
. only for the linker. If this type of section appears in
|
||||||
@ -231,114 +319,23 @@ CODE_FRAGMENT
|
|||||||
. might be cleaner to have some more general mechanism to
|
. might be cleaner to have some more general mechanism to
|
||||||
. allow the back end to control what the linker does with
|
. allow the back end to control what the linker does with
|
||||||
. sections. *}
|
. sections. *}
|
||||||
.#define SEC_COFF_SHARED_LIBRARY 0x800
|
.#define SEC_COFF_SHARED_LIBRARY 0x10000000
|
||||||
.
|
|
||||||
. {* The section contains thread local data. *}
|
|
||||||
.#define SEC_THREAD_LOCAL 0x1000
|
|
||||||
.
|
|
||||||
. {* The section has GOT references. This flag is only for the
|
|
||||||
. linker, and is currently only used by the elf32-hppa back end.
|
|
||||||
. It will be set if global offset table references were detected
|
|
||||||
. in this section, which indicate to the linker that the section
|
|
||||||
. contains PIC code, and must be handled specially when doing a
|
|
||||||
. static link. *}
|
|
||||||
.#define SEC_HAS_GOT_REF 0x4000
|
|
||||||
.
|
|
||||||
. {* The section contains common symbols (symbols may be defined
|
|
||||||
. multiple times, the value of a symbol is the amount of
|
|
||||||
. space it requires, and the largest symbol value is the one
|
|
||||||
. used). Most targets have exactly one of these (which we
|
|
||||||
. translate to bfd_com_section_ptr), but ECOFF has two. *}
|
|
||||||
.#define SEC_IS_COMMON 0x8000
|
|
||||||
.
|
|
||||||
. {* The section contains only debugging information. For
|
|
||||||
. example, this is set for ELF .debug and .stab sections.
|
|
||||||
. strip tests this flag to see if a section can be
|
|
||||||
. discarded. *}
|
|
||||||
.#define SEC_DEBUGGING 0x10000
|
|
||||||
.
|
|
||||||
. {* The contents of this section are held in memory pointed to
|
|
||||||
. by the contents field. This is checked by bfd_get_section_contents,
|
|
||||||
. and the data is retrieved from memory if appropriate. *}
|
|
||||||
.#define SEC_IN_MEMORY 0x20000
|
|
||||||
.
|
|
||||||
. {* The contents of this section are to be excluded by the
|
|
||||||
. linker for executable and shared objects unless those
|
|
||||||
. objects are to be further relocated. *}
|
|
||||||
.#define SEC_EXCLUDE 0x40000
|
|
||||||
.
|
|
||||||
. {* The contents of this section are to be sorted based on the sum of
|
|
||||||
. the symbol and addend values specified by the associated relocation
|
|
||||||
. entries. Entries without associated relocation entries will be
|
|
||||||
. appended to the end of the section in an unspecified order. *}
|
|
||||||
.#define SEC_SORT_ENTRIES 0x80000
|
|
||||||
.
|
|
||||||
. {* When linking, duplicate sections of the same name should be
|
|
||||||
. discarded, rather than being combined into a single section as
|
|
||||||
. is usually done. This is similar to how common symbols are
|
|
||||||
. handled. See SEC_LINK_DUPLICATES below. *}
|
|
||||||
.#define SEC_LINK_ONCE 0x100000
|
|
||||||
.
|
|
||||||
. {* If SEC_LINK_ONCE is set, this bitfield describes how the linker
|
|
||||||
. should handle duplicate sections. *}
|
|
||||||
.#define SEC_LINK_DUPLICATES 0x600000
|
|
||||||
.
|
|
||||||
. {* This value for SEC_LINK_DUPLICATES means that duplicate
|
|
||||||
. sections with the same name should simply be discarded. *}
|
|
||||||
.#define SEC_LINK_DUPLICATES_DISCARD 0x0
|
|
||||||
.
|
|
||||||
. {* This value for SEC_LINK_DUPLICATES means that the linker
|
|
||||||
. should warn if there are any duplicate sections, although
|
|
||||||
. it should still only link one copy. *}
|
|
||||||
.#define SEC_LINK_DUPLICATES_ONE_ONLY 0x200000
|
|
||||||
.
|
|
||||||
. {* This value for SEC_LINK_DUPLICATES means that the linker
|
|
||||||
. should warn if any duplicate sections are a different size. *}
|
|
||||||
.#define SEC_LINK_DUPLICATES_SAME_SIZE 0x400000
|
|
||||||
.
|
|
||||||
. {* This value for SEC_LINK_DUPLICATES means that the linker
|
|
||||||
. should warn if any duplicate sections contain different
|
|
||||||
. contents. *}
|
|
||||||
.#define SEC_LINK_DUPLICATES_SAME_CONTENTS 0x600000
|
|
||||||
.
|
|
||||||
. {* This section was created by the linker as part of dynamic
|
|
||||||
. relocation or other arcane processing. It is skipped when
|
|
||||||
. going through the first-pass output, trusting that someone
|
|
||||||
. else up the line will take care of it later. *}
|
|
||||||
.#define SEC_LINKER_CREATED 0x800000
|
|
||||||
.
|
|
||||||
. {* This section should not be subject to garbage collection. *}
|
|
||||||
.#define SEC_KEEP 0x1000000
|
|
||||||
.
|
|
||||||
. {* This section contains "short" data, and should be placed
|
|
||||||
. "near" the GP. *}
|
|
||||||
.#define SEC_SMALL_DATA 0x2000000
|
|
||||||
.
|
.
|
||||||
. {* This section contains data which may be shared with other
|
. {* This section contains data which may be shared with other
|
||||||
. executables or shared objects. *}
|
. executables or shared objects. This is for COFF only. *}
|
||||||
.#define SEC_SHARED 0x4000000
|
.#define SEC_COFF_SHARED 0x20000000
|
||||||
.
|
.
|
||||||
. {* When a section with this flag is being linked, then if the size of
|
. {* 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
|
. 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
|
. boundary. If the size of the input section is one page or more,
|
||||||
. should be aligned on a page boundary. *}
|
. it should be aligned on a page boundary. This is for TI
|
||||||
.#define SEC_BLOCK 0x8000000
|
. TMS320C54X only. *}
|
||||||
|
.#define SEC_TIC54X_BLOCK 0x40000000
|
||||||
.
|
.
|
||||||
. {* Conditionally link this section; do not link if there are no
|
. {* Conditionally link this section; do not link if there are no
|
||||||
. references found to any symbol in the section. *}
|
. references found to any symbol in the section. This is for TI
|
||||||
.#define SEC_CLINK 0x10000000
|
. TMS320C54X only. *}
|
||||||
.
|
.#define SEC_TIC54X_CLINK 0x80000000
|
||||||
. {* Attempt to merge identical entities in the section.
|
|
||||||
. Entity size is given in the entsize field. *}
|
|
||||||
.#define SEC_MERGE 0x20000000
|
|
||||||
.
|
|
||||||
. {* If given with SEC_MERGE, entities to merge are zero terminated
|
|
||||||
. strings where entsize specifies character size instead of fixed
|
|
||||||
. size entries. *}
|
|
||||||
.#define SEC_STRINGS 0x40000000
|
|
||||||
.
|
|
||||||
. {* This section contains data about section groups. *}
|
|
||||||
.#define SEC_GROUP 0x80000000
|
|
||||||
.
|
.
|
||||||
. {* End of section flags. *}
|
. {* End of section flags. *}
|
||||||
.
|
.
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2005-02-21 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* objcopy.c (parse_flags): Replace SEC_SHARED with
|
||||||
|
SEC_COFF_SHARED.
|
||||||
|
|
||||||
|
* objdump.c (dump_section_header): Dump SEC_TIC54X_BLOCK and
|
||||||
|
SEC_TIC54X_CLINK for TI c54x only. Remove SEC_ARCH_BIT_0. Dump
|
||||||
|
SEC_COFF_SHARED for COFF only.
|
||||||
|
|
||||||
2005-02-21 Alan Modra <amodra@bigpond.net.au>
|
2005-02-21 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* Makefile.am: Run "make dep-am"
|
* Makefile.am: Run "make dep-am"
|
||||||
|
@ -547,7 +547,7 @@ parse_flags (const char *s)
|
|||||||
PARSE_FLAG ("code", SEC_CODE);
|
PARSE_FLAG ("code", SEC_CODE);
|
||||||
PARSE_FLAG ("data", SEC_DATA);
|
PARSE_FLAG ("data", SEC_DATA);
|
||||||
PARSE_FLAG ("rom", SEC_ROM);
|
PARSE_FLAG ("rom", SEC_ROM);
|
||||||
PARSE_FLAG ("share", SEC_SHARED);
|
PARSE_FLAG ("share", SEC_COFF_SHARED);
|
||||||
PARSE_FLAG ("contents", SEC_HAS_CONTENTS);
|
PARSE_FLAG ("contents", SEC_HAS_CONTENTS);
|
||||||
#undef PARSE_FLAG
|
#undef PARSE_FLAG
|
||||||
else
|
else
|
||||||
|
@ -290,7 +290,7 @@ nonfatal (const char *msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dump_section_header (bfd *abfd ATTRIBUTE_UNUSED, asection *section,
|
dump_section_header (bfd *abfd, asection *section,
|
||||||
void *ignored ATTRIBUTE_UNUSED)
|
void *ignored ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
char *comma = "";
|
char *comma = "";
|
||||||
@ -324,11 +324,14 @@ dump_section_header (bfd *abfd ATTRIBUTE_UNUSED, asection *section,
|
|||||||
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");
|
if (bfd_get_arch (abfd) == bfd_arch_tic54x)
|
||||||
PF (SEC_CLINK, "CLINK");
|
{
|
||||||
|
PF (SEC_TIC54X_BLOCK, "BLOCK");
|
||||||
|
PF (SEC_TIC54X_CLINK, "CLINK");
|
||||||
|
}
|
||||||
PF (SEC_SMALL_DATA, "SMALL_DATA");
|
PF (SEC_SMALL_DATA, "SMALL_DATA");
|
||||||
PF (SEC_SHARED, "SHARED");
|
if (bfd_get_flavour (abfd) == bfd_target_coff_flavour)
|
||||||
PF (SEC_ARCH_BIT_0, "ARCH_BIT_0");
|
PF (SEC_COFF_SHARED, "SHARED");
|
||||||
PF (SEC_THREAD_LOCAL, "THREAD_LOCAL");
|
PF (SEC_THREAD_LOCAL, "THREAD_LOCAL");
|
||||||
|
|
||||||
if ((section->flags & SEC_LINK_ONCE) != 0)
|
if ((section->flags & SEC_LINK_ONCE) != 0)
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
2005-02-21 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* config/obj-coff.c (obj_coff_section): Replace SEC_SHARED with
|
||||||
|
SEC_COFF_SHARED.
|
||||||
|
|
||||||
|
* config/tc-tic54x.c (tic54x_bss): Replace SEC_BLOCK with
|
||||||
|
SEC_TIC54X_BLOCK.
|
||||||
|
(demand_empty_rest_of_line): Likewise.
|
||||||
|
(tic54x_sblock): Likewise.
|
||||||
|
(tic54x_clink): Replace with SEC_CLINK with SEC_TIC54X_CLINK.
|
||||||
|
|
||||||
2005-02-21 Alan Modra <amodra@bigpond.net.au>
|
2005-02-21 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* read.c (address_bytes): New function.
|
* read.c (address_bytes): New function.
|
||||||
|
@ -1607,7 +1607,7 @@ obj_coff_section (ignore)
|
|||||||
case 'b': flags |= SEC_ALLOC; flags &=~ SEC_LOAD; break;
|
case 'b': flags |= SEC_ALLOC; flags &=~ SEC_LOAD; break;
|
||||||
case 'n': flags &=~ SEC_LOAD; flags |= SEC_NEVER_LOAD; break;
|
case 'n': flags &=~ SEC_LOAD; flags |= SEC_NEVER_LOAD; break;
|
||||||
|
|
||||||
case 's': flags |= SEC_SHARED; /* fall through */
|
case 's': flags |= SEC_COFF_SHARED; /* fall through */
|
||||||
case 'd': flags |= SEC_DATA | SEC_LOAD; /* fall through */
|
case 'd': flags |= SEC_DATA | SEC_LOAD; /* fall through */
|
||||||
case 'w': flags &=~ SEC_READONLY; break;
|
case 'w': flags &=~ SEC_READONLY; break;
|
||||||
|
|
||||||
@ -1662,7 +1662,7 @@ obj_coff_section (ignore)
|
|||||||
/* This section's attributes have already been set. Warn if the
|
/* This section's attributes have already been set. Warn if the
|
||||||
attributes don't match. */
|
attributes don't match. */
|
||||||
flagword matchflags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
|
flagword matchflags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
|
||||||
| SEC_DATA | SEC_SHARED | SEC_NEVER_LOAD);
|
| SEC_DATA | SEC_COFF_SHARED | SEC_NEVER_LOAD);
|
||||||
if ((flags ^ oldflags) & matchflags)
|
if ((flags ^ oldflags) & matchflags)
|
||||||
as_warn (_("Ignoring changed section attributes for %s"), name);
|
as_warn (_("Ignoring changed section attributes for %s"), name);
|
||||||
}
|
}
|
||||||
|
@ -661,7 +661,7 @@ tic54x_bss (x)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (block)
|
if (block)
|
||||||
bss_section->flags |= SEC_BLOCK;
|
bss_section->flags |= SEC_TIC54X_BLOCK;
|
||||||
|
|
||||||
subseg_set (current_seg, current_subseg); /* Restore current seg. */
|
subseg_set (current_seg, current_subseg); /* Restore current seg. */
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
@ -1574,7 +1574,7 @@ tic54x_usect (x)
|
|||||||
*p = 0;
|
*p = 0;
|
||||||
|
|
||||||
if (blocking_flag)
|
if (blocking_flag)
|
||||||
flags |= SEC_BLOCK;
|
flags |= SEC_TIC54X_BLOCK;
|
||||||
|
|
||||||
if (!bfd_set_section_flags (stdoutput, seg, flags))
|
if (!bfd_set_section_flags (stdoutput, seg, flags))
|
||||||
as_warn ("Error setting flags for \"%s\": %s", name,
|
as_warn ("Error setting flags for \"%s\": %s", name,
|
||||||
@ -2014,7 +2014,7 @@ tic54x_clink (ignored)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
seg->flags |= SEC_CLINK;
|
seg->flags |= SEC_TIC54X_CLINK;
|
||||||
|
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
}
|
}
|
||||||
@ -2325,7 +2325,7 @@ tic54x_sblock (ignore)
|
|||||||
ignore_rest_of_line ();
|
ignore_rest_of_line ();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
seg->flags |= SEC_BLOCK;
|
seg->flags |= SEC_TIC54X_BLOCK;
|
||||||
|
|
||||||
c = *input_line_pointer;
|
c = *input_line_pointer;
|
||||||
if (!is_end_of_line[(int) c])
|
if (!is_end_of_line[(int) c])
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
2005-02-21 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* ldlang.c (lang_add_section): Check SEC_TIC54X_BLOCK for TI
|
||||||
|
tic54x input only.
|
||||||
|
(lang_size_sections_1): Check SEC_COFF_SHARED_LIBRARY for COFF
|
||||||
|
and ECOFF output only.
|
||||||
|
|
||||||
2005-02-21 Alan Modra <amodra@bigpond.net.au>
|
2005-02-21 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* config.in: Regenerate.
|
* config.in: Regenerate.
|
||||||
|
@ -1413,9 +1413,10 @@ lang_add_section (lang_statement_list_type *ptr,
|
|||||||
if (output->section_alignment != -1)
|
if (output->section_alignment != -1)
|
||||||
output->bfd_section->alignment_power = output->section_alignment;
|
output->bfd_section->alignment_power = output->section_alignment;
|
||||||
|
|
||||||
if (section->flags & SEC_BLOCK)
|
if (bfd_get_arch (section->owner) == bfd_arch_tic54x
|
||||||
|
&& (section->flags & SEC_TIC54X_BLOCK) != 0)
|
||||||
{
|
{
|
||||||
output->bfd_section->flags |= SEC_BLOCK;
|
output->bfd_section->flags |= SEC_TIC54X_BLOCK;
|
||||||
/* FIXME: This value should really be obtained from the bfd... */
|
/* FIXME: This value should really be obtained from the bfd... */
|
||||||
output->block_value = 128;
|
output->block_value = 128;
|
||||||
}
|
}
|
||||||
@ -3424,7 +3425,9 @@ lang_size_sections_1
|
|||||||
address from the input section. FIXME: This is COFF
|
address from the input section. FIXME: This is COFF
|
||||||
specific; it would be cleaner if there were some other way
|
specific; it would be cleaner if there were some other way
|
||||||
to do this, but nothing simple comes to mind. */
|
to do this, but nothing simple comes to mind. */
|
||||||
if ((os->bfd_section->flags & SEC_COFF_SHARED_LIBRARY) != 0)
|
if ((bfd_get_flavour (output_bfd) == bfd_target_ecoff_flavour
|
||||||
|
|| bfd_get_flavour (output_bfd) == bfd_target_coff_flavour)
|
||||||
|
&& (os->bfd_section->flags & SEC_COFF_SHARED_LIBRARY) != 0)
|
||||||
{
|
{
|
||||||
asection *input;
|
asection *input;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user