mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-27 05:50:43 +00:00
blackfin: add support for L1 code/data flags
Add new linker options for marking programs to load into L1 memory at runtime. This needs new EF flag bits, so declare them. Signed-off-by: Jie Zhang <jie.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
c85f715a62
commit
781303cee5
@ -1,3 +1,10 @@
|
||||
2010-11-16 Jie Zhang <jie.zhang@analog.com>
|
||||
|
||||
* elf32-bfin.c (elf32_bfin_code_in_l1): New variable.
|
||||
(elf32_bfin_data_in_l1): New variable.
|
||||
(elf32_bfin_final_write_processing): New.
|
||||
(elf_backend_final_write_processing): Define.
|
||||
|
||||
2010-11-15 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
PR binutils/12177
|
||||
|
@ -1120,6 +1120,22 @@ bfin_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED,
|
||||
return (reloc_howto_type *) NULL;
|
||||
}
|
||||
|
||||
/* Set by ld emulation if --code-in-l1. */
|
||||
bfd_boolean elf32_bfin_code_in_l1 = 0;
|
||||
|
||||
/* Set by ld emulation if --data-in-l1. */
|
||||
bfd_boolean elf32_bfin_data_in_l1 = 0;
|
||||
|
||||
static void
|
||||
elf32_bfin_final_write_processing (bfd *abfd,
|
||||
bfd_boolean linker ATTRIBUTE_UNUSED)
|
||||
{
|
||||
if (elf32_bfin_code_in_l1)
|
||||
elf_elfheader (abfd)->e_flags |= EF_BFIN_CODE_IN_L1;
|
||||
if (elf32_bfin_data_in_l1)
|
||||
elf_elfheader (abfd)->e_flags |= EF_BFIN_DATA_IN_L1;
|
||||
}
|
||||
|
||||
/* Return TRUE if the name is a local label.
|
||||
bfin local labels begin with L$. */
|
||||
static bfd_boolean
|
||||
@ -5787,6 +5803,8 @@ struct bfd_elf_special_section const elf32_bfin_special_sections[] =
|
||||
elf32_bfin_set_private_flags
|
||||
#define bfd_elf32_bfd_print_private_bfd_data \
|
||||
elf32_bfin_print_private_bfd_data
|
||||
#define elf_backend_final_write_processing \
|
||||
elf32_bfin_final_write_processing
|
||||
#define elf_backend_reloc_type_class elf32_bfin_reloc_type_class
|
||||
#define elf_backend_can_gc_sections 1
|
||||
#define elf_backend_special_sections elf32_bfin_special_sections
|
||||
|
@ -1,3 +1,7 @@
|
||||
2010-11-16 Jie Zhang <jie.zhang@analog.com>
|
||||
|
||||
* readelf.c (get_machine_flags): Deal with Blackfin specific flags.
|
||||
|
||||
2010-11-11 Mingming Sun <mingm.sun@gmail.com>
|
||||
|
||||
* readelf.c (get_machine_flags): Add loongson-3a.
|
||||
|
@ -2238,6 +2238,21 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
|
||||
decode_ARM_machine_flags (e_flags, buf);
|
||||
break;
|
||||
|
||||
case EM_BLACKFIN:
|
||||
if (e_flags & EF_BFIN_PIC)
|
||||
strcat (buf, ", PIC");
|
||||
|
||||
if (e_flags & EF_BFIN_FDPIC)
|
||||
strcat (buf, ", FDPIC");
|
||||
|
||||
if (e_flags & EF_BFIN_CODE_IN_L1)
|
||||
strcat (buf, ", code in L1");
|
||||
|
||||
if (e_flags & EF_BFIN_DATA_IN_L1)
|
||||
strcat (buf, ", data in L1");
|
||||
|
||||
break;
|
||||
|
||||
case EM_CYGNUS_FRV:
|
||||
switch (e_flags & EF_FRV_CPU_MASK)
|
||||
{
|
||||
|
@ -1,3 +1,8 @@
|
||||
2010-11-16 Jie Zhang <jie.zhang@analog.com>
|
||||
|
||||
* elf/bfin.h (EF_BFIN_CODE_IN_L1): Define.
|
||||
(EF_BFIN_DATA_IN_L1): Define.
|
||||
|
||||
2010-11-04 Ian Lance Taylor <iant@google.com>
|
||||
|
||||
* dwarf2.h (enum dwarf_source_language): Add DW_LANG_Go.
|
||||
|
@ -88,5 +88,8 @@ END_RELOC_NUMBERS (R_BFIN_max)
|
||||
#define EF_BFIN_PIC 0x00000001 /* -fpic */
|
||||
#define EF_BFIN_FDPIC 0x00000002 /* -mfdpic */
|
||||
|
||||
#define EF_BFIN_CODE_IN_L1 0x00000010 /* --code-in-l1 */
|
||||
#define EF_BFIN_DATA_IN_L1 0x00000020 /* --data-in-l1 */
|
||||
|
||||
#define EF_BFIN_PIC_FLAGS (EF_BFIN_PIC | EF_BFIN_FDPIC)
|
||||
#endif /* _ELF_BFIN_H */
|
||||
|
@ -1,3 +1,11 @@
|
||||
2010-11-16 Jie Zhang <jie.zhang@analog.com>
|
||||
|
||||
* Makefile.am (eelf32bfinfd.c, eelf32bfin.c): Depend on bfin.em.
|
||||
* Makefile.in: Regenerated.
|
||||
* emulparams/bfin.sh (EXTRA_EM_FILE): Set.
|
||||
* emulparams/elf32bfinfd.sh (EXTRA_EM_FILE): Likewise.
|
||||
* emultempl/bfin.em: New.
|
||||
|
||||
2010-11-16 Yasuaki Taniguchi <taniguchi.yasua@jp.fujitsu.com>
|
||||
|
||||
* emultempl/pe.em (_list_options): Correct typo.
|
||||
|
@ -791,11 +791,12 @@ edelta68.c: $(srcdir)/emulparams/delta68.sh \
|
||||
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS}
|
||||
${GENSCRIPTS} delta68 "$(tdir_delta68)"
|
||||
eelf32bfin.c: $(srcdir)/emulparams/bfin.sh \
|
||||
$(ELF_DEPS) \
|
||||
$(ELF_DEPS) $(srcdir)/emultempl/bfin.em \
|
||||
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
${GENSCRIPTS} elf32bfin "$(tdir_elf32bfin)" bfin
|
||||
eelf32bfinfd.c: $(srcdir)/emulparams/elf32bfinfd.sh $(srcdir)/emulparams/bfin.sh \
|
||||
$(ELF_DEPS) \
|
||||
eelf32bfinfd.c: $(srcdir)/emulparams/elf32bfinfd.sh \
|
||||
$(srcdir)/emulparams/bfin.sh \
|
||||
$(ELF_DEPS) $(srcdir)/emultempl/bfin.em \
|
||||
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
${GENSCRIPTS} elf32bfinfd "$(tdir_elf32bfinfd)" elf32bfinfd
|
||||
eelf32_dlx.c: $(srcdir)/emulparams/elf32_dlx.sh \
|
||||
|
@ -2214,11 +2214,12 @@ edelta68.c: $(srcdir)/emulparams/delta68.sh \
|
||||
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS}
|
||||
${GENSCRIPTS} delta68 "$(tdir_delta68)"
|
||||
eelf32bfin.c: $(srcdir)/emulparams/bfin.sh \
|
||||
$(ELF_DEPS) \
|
||||
$(ELF_DEPS) $(srcdir)/emultempl/bfin.em \
|
||||
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
${GENSCRIPTS} elf32bfin "$(tdir_elf32bfin)" bfin
|
||||
eelf32bfinfd.c: $(srcdir)/emulparams/elf32bfinfd.sh $(srcdir)/emulparams/bfin.sh \
|
||||
$(ELF_DEPS) \
|
||||
eelf32bfinfd.c: $(srcdir)/emulparams/elf32bfinfd.sh \
|
||||
$(srcdir)/emulparams/bfin.sh \
|
||||
$(ELF_DEPS) $(srcdir)/emultempl/bfin.em \
|
||||
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
${GENSCRIPTS} elf32bfinfd "$(tdir_elf32bfinfd)" elf32bfinfd
|
||||
eelf32_dlx.c: $(srcdir)/emulparams/elf32_dlx.sh \
|
||||
|
@ -9,3 +9,4 @@ TEMPLATE_NAME=elf32
|
||||
GENERATE_SHLIB_SCRIPT=yes
|
||||
EMBEDDED=yes
|
||||
USER_LABEL_PREFIX=_
|
||||
EXTRA_EM_FILE=bfin
|
||||
|
@ -43,3 +43,4 @@ OTHER_SECTIONS="
|
||||
*(.l1.text)
|
||||
}
|
||||
"
|
||||
EXTRA_EM_FILE=bfin
|
||||
|
Loading…
Reference in New Issue
Block a user