This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
PATCH: Rearrange SEC_XXX bits
- From: "H. J. Lu" <hjl at lucon dot org>
- To: binutils at sources dot redhat dot com
- Date: Mon, 21 Feb 2005 13:19:25 -0800
- Subject: PATCH: Rearrange SEC_XXX bits
We have very limited space in BFD section flag. But SEC_ARCH_BIT_0 is
never used. There are also some COFF and TI specific bits. This patch
removes SEC_ARCH_BIT_0 and makes COFF/TI specific bits for COFF/TI
only so that other format/target can reuse those bits.
H.J.
----
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.
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.
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.
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.
gas/testsuite/
2005-02-21 H.J. Lu <hongjiu.lu@intel.com>
* gas/tic54x/sections.d: Replace BLOCK with TIC54X_BLOCK and
CLINK with 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.
--- binutils/bfd/coffcode.h.sec 2005-02-13 09:51:40.000000000 -0800
+++ binutils/bfd/coffcode.h 2005-02-21 13:03:05.178091748 -0800
@@ -494,12 +494,12 @@ sec_to_styp_flags (sec_name, sec_flags)
}
#ifdef STYP_CLINK
- if (sec_flags & SEC_CLINK)
+ if (sec_flags & SEC_TIC54X_CLINK)
styp_flags |= STYP_CLINK;
#endif
#ifdef STYP_BLOCK
- if (sec_flags & SEC_BLOCK)
+ if (sec_flags & SEC_TIC54X_BLOCK)
styp_flags |= STYP_BLOCK;
#endif
@@ -579,7 +579,7 @@ sec_to_styp_flags (sec_name, sec_flags)
styp_flags |= IMAGE_SCN_MEM_WRITE; /* Invert READONLY for write. */
if (sec_flags & SEC_CODE)
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. */
return styp_flags;
@@ -608,12 +608,12 @@ styp_to_sec_flags (abfd, hdr, name, sect
#ifdef STYP_BLOCK
if (styp_flags & STYP_BLOCK)
- sec_flags |= SEC_BLOCK;
+ sec_flags |= SEC_TIC54X_BLOCK;
#endif
#ifdef STYP_CLINK
if (styp_flags & STYP_CLINK)
- sec_flags |= SEC_CLINK;
+ sec_flags |= SEC_TIC54X_CLINK;
#endif
#ifdef STYP_NOLOAD
@@ -1086,7 +1086,7 @@ styp_to_sec_flags (abfd, hdr, name, sect
sec_flags |= SEC_DEBUGGING;
break;
case IMAGE_SCN_MEM_SHARED:
- sec_flags |= SEC_SHARED;
+ sec_flags |= SEC_COFF_SHARED;
break;
case IMAGE_SCN_LNK_REMOVE:
sec_flags |= SEC_EXCLUDE;
--- binutils/bfd/elfxx-target.h.sec 2005-01-31 19:28:45.000000000 -0800
+++ binutils/bfd/elfxx-target.h 2005-02-21 10:04:33.000000000 -0800
@@ -641,7 +641,7 @@ const bfd_target TARGET_BIG_SYM =
/* section_flags: mask of all section flags */
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
| 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
predictable, and if so what is it */
@@ -737,7 +737,7 @@ const bfd_target TARGET_LITTLE_SYM =
/* section_flags: mask of all section flags */
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
| 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
predictable, and if so what is it */
--- binutils/bfd/section.c.sec 2005-01-31 19:28:47.000000000 -0800
+++ binutils/bfd/section.c 2005-02-21 10:02:48.000000000 -0800
@@ -183,23 +183,17 @@ CODE_FRAGMENT
. some relocation information too. *}
.#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. *}
-.#define SEC_READONLY 0x010
+.#define SEC_READONLY 0x008
.
. {* The section contains code only. *}
-.#define SEC_CODE 0x020
+.#define SEC_CODE 0x010
.
. {* The section contains data only. *}
-.#define SEC_DATA 0x040
+.#define SEC_DATA 0x020
.
. {* The section will reside in ROM. *}
-.#define SEC_ROM 0x080
+.#define SEC_ROM 0x040
.
. {* The section contains constructor information. This section
. type is used by the linker to create lists of constructors and
@@ -211,30 +205,19 @@ CODE_FRAGMENT
. sections called <<__CTOR_LIST__>> and relocate the data
. contained within - exactly the operations it would peform on
. standard data. *}
-.#define SEC_CONSTRUCTOR 0x100
+.#define SEC_CONSTRUCTOR 0x080
.
. {* The section has contents - a data section could be
. <<SEC_ALLOC>> | <<SEC_HAS_CONTENTS>>; a debug section could be
. <<SEC_HAS_CONTENTS>> *}
-.#define SEC_HAS_CONTENTS 0x200
+.#define SEC_HAS_CONTENTS 0x100
.
. {* An instruction to the linker to not output the section
. even if it has information which would normally be written. *}
-.#define SEC_NEVER_LOAD 0x400
-.
-. {* The section is a COFF shared library section. This flag is
-. only for the linker. If this type of section appears in
-. the input file, the linker must copy it to the output file
-. without changing the vma or size. FIXME: Although this
-. was originally intended to be general, it really is COFF
-. specific (and the flag was renamed to indicate this). It
-. might be cleaner to have some more general mechanism to
-. allow the back end to control what the linker does with
-. sections. *}
-.#define SEC_COFF_SHARED_LIBRARY 0x800
+.#define SEC_NEVER_LOAD 0x200
.
. {* The section contains thread local data. *}
-.#define SEC_THREAD_LOCAL 0x1000
+.#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.
@@ -242,46 +225,46 @@ CODE_FRAGMENT
. 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
+.#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 0x8000
+.#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 0x10000
+.#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 0x20000
+.#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 0x40000
+.#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 0x80000
+.#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 0x100000
+.#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 0x600000
+.#define SEC_LINK_DUPLICATES 0x40000
.
. {* This value for SEC_LINK_DUPLICATES means that duplicate
. sections with the same name should simply be discarded. *}
@@ -290,55 +273,69 @@ CODE_FRAGMENT
. {* 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
+.#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 0x400000
+.#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 0x600000
+.#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 0x800000
+.#define SEC_LINKER_CREATED 0x200000
.
. {* This section should not be subject to garbage collection. *}
-.#define SEC_KEEP 0x1000000
+.#define SEC_KEEP 0x400000
.
. {* 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
-. executables or shared objects. *}
-.#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
+.#define SEC_SMALL_DATA 0x800000
.
. {* Attempt to merge identical entities in the section.
. Entity size is given in the entsize field. *}
-.#define SEC_MERGE 0x20000000
+.#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 0x40000000
+.#define SEC_STRINGS 0x2000000
.
. {* This section contains data about section groups. *}
-.#define SEC_GROUP 0x80000000
+.#define SEC_GROUP 0x4000000
+.
+. {* The section is a COFF shared library section. This flag is
+. only for the linker. If this type of section appears in
+. the input file, the linker must copy it to the output file
+. without changing the vma or size. FIXME: Although this
+. was originally intended to be general, it really is COFF
+. specific (and the flag was renamed to indicate this). It
+. might be cleaner to have some more general mechanism to
+. allow the back end to control what the linker does with
+. sections. *}
+.#define SEC_COFF_SHARED_LIBRARY 0x8000000
+.
+. {* This section contains data which may be shared with other
+. executables or shared objects. This is for COFF only. *}
+.#define SEC_COFF_SHARED 0x10000000
+.
+. {* 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. This is for TI
+. TMS320C54X only. *}
+.#define SEC_TIC54X_BLOCK 0x20000000
+.
+. {* Conditionally link this section; do not link if there are no
+. references found to any symbol in the section. This is for TI
+. TMS320C54X only. *}
+.#define SEC_TIC54X_CLINK 0x40000000
.
. {* End of section flags. *}
.
--- binutils/binutils/objcopy.c.sec 2004-12-16 12:27:06.000000000 -0800
+++ binutils/binutils/objcopy.c 2005-02-21 10:09:08.000000000 -0800
@@ -547,7 +547,7 @@ parse_flags (const char *s)
PARSE_FLAG ("code", SEC_CODE);
PARSE_FLAG ("data", SEC_DATA);
PARSE_FLAG ("rom", SEC_ROM);
- PARSE_FLAG ("share", SEC_SHARED);
+ PARSE_FLAG ("coff_share", SEC_COFF_SHARED);
PARSE_FLAG ("contents", SEC_HAS_CONTENTS);
#undef PARSE_FLAG
else
--- binutils/binutils/objdump.c.sec 2005-01-11 08:17:20.000000000 -0800
+++ binutils/binutils/objdump.c 2005-02-21 10:17:42.000000000 -0800
@@ -291,7 +291,7 @@ nonfatal (const char *msg)
}
static void
-dump_section_header (bfd *abfd ATTRIBUTE_UNUSED, asection *section,
+dump_section_header (bfd *abfd, asection *section,
void *ignored ATTRIBUTE_UNUSED)
{
char *comma = "";
@@ -325,11 +325,14 @@ dump_section_header (bfd *abfd ATTRIBUTE
PF (SEC_NEVER_LOAD, "NEVER_LOAD");
PF (SEC_EXCLUDE, "EXCLUDE");
PF (SEC_SORT_ENTRIES, "SORT_ENTRIES");
- PF (SEC_BLOCK, "BLOCK");
- PF (SEC_CLINK, "CLINK");
+ if (bfd_get_arch (abfd) == bfd_arch_tic54x)
+ {
+ PF (SEC_TIC54X_BLOCK, "TIC54X_BLOCK");
+ PF (SEC_TIC54X_CLINK, "TIC54X_CLINK");
+ }
PF (SEC_SMALL_DATA, "SMALL_DATA");
- PF (SEC_SHARED, "SHARED");
- PF (SEC_ARCH_BIT_0, "ARCH_BIT_0");
+ if (bfd_get_flavour (abfd) == bfd_target_coff_flavour)
+ PF (SEC_COFF_SHARED, "COFF_SHARED");
PF (SEC_THREAD_LOCAL, "THREAD_LOCAL");
if ((section->flags & SEC_LINK_ONCE) != 0)
--- binutils/gas/config/obj-coff.c.sec 2005-02-17 07:46:22.000000000 -0800
+++ binutils/gas/config/obj-coff.c 2005-02-21 10:11:16.000000000 -0800
@@ -1607,7 +1607,7 @@ obj_coff_section (ignore)
case 'b': flags |= SEC_ALLOC; flags &=~ SEC_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 'w': flags &=~ SEC_READONLY; break;
@@ -1662,7 +1662,7 @@ obj_coff_section (ignore)
/* This section's attributes have already been set. Warn if the
attributes don't match. */
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)
as_warn (_("Ignoring changed section attributes for %s"), name);
}
--- binutils/gas/config/tc-tic54x.c.sec 2005-01-31 19:28:55.000000000 -0800
+++ binutils/gas/config/tc-tic54x.c 2005-02-21 10:19:32.000000000 -0800
@@ -661,7 +661,7 @@ tic54x_bss (x)
}
if (block)
- bss_section->flags |= SEC_BLOCK;
+ bss_section->flags |= SEC_TIC54X_BLOCK;
subseg_set (current_seg, current_subseg); /* Restore current seg. */
demand_empty_rest_of_line ();
@@ -1574,7 +1574,7 @@ tic54x_usect (x)
*p = 0;
if (blocking_flag)
- flags |= SEC_BLOCK;
+ flags |= SEC_TIC54X_BLOCK;
if (!bfd_set_section_flags (stdoutput, seg, flags))
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 ();
}
@@ -2325,7 +2325,7 @@ tic54x_sblock (ignore)
ignore_rest_of_line ();
return;
}
- seg->flags |= SEC_BLOCK;
+ seg->flags |= SEC_TIC54X_BLOCK;
c = *input_line_pointer;
if (!is_end_of_line[(int) c])
--- binutils/gas/testsuite/gas/tic54x/sections.d.sec 2001-11-14 22:46:58.000000000 -0800
+++ binutils/gas/testsuite/gas/tic54x/sections.d 2005-02-21 11:25:16.419190674 -0800
@@ -12,13 +12,13 @@ Idx Name Size VMA LM
2 .bss 00000014 00000000 00000000 0000.... 2..0
ALLOC
3 newvars 00000017 00000000 00000000 0000.... 2..1
- ALLOC, BLOCK
+ ALLOC, TIC54X_BLOCK
4 vectors 00000002 00000000 00000000 0000.... 2..0
- CONTENTS, ALLOC, LOAD, CODE, BLOCK
+ CONTENTS, ALLOC, LOAD, CODE, TIC54X_BLOCK
5 clink 00000002 00000000 00000000 0000.... 2..0
- CONTENTS, ALLOC, LOAD, DATA, CLINK
+ CONTENTS, ALLOC, LOAD, DATA, TIC54X_CLINK
6 blksect 00000002 00000000 00000000 0000.... 2..0
- CONTENTS, ALLOC, LOAD, DATA, BLOCK
+ CONTENTS, ALLOC, LOAD, DATA, TIC54X_BLOCK
Disassembly of section .text:
00000000 <.text>:
--- binutils/ld/ldlang.c.sec 2005-01-30 08:42:29.000000000 -0800
+++ binutils/ld/ldlang.c 2005-02-21 10:27:10.000000000 -0800
@@ -1413,9 +1413,10 @@ lang_add_section (lang_statement_list_ty
if (output->section_alignment != -1)
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... */
output->block_value = 128;
}
@@ -3424,7 +3425,9 @@ lang_size_sections_1
address from the input section. FIXME: This is COFF
specific; it would be cleaner if there were some other way
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;