8e45593ff3
Joseph Myers <joseph@codesourcery.com> Andrew Stubbs <ams@codesourcery.com> bfd/ * config.bfd (sh-*-uclinux* | sh[12]-*-uclinux*): Add bfd_elf32_shl_vec, and FDPIC vectors to targ_selvecs. * configure.in: Handle FDPIC vectors. * elf32-sh-relocs.h: Add FDPIC and movi20 relocations. * elf32-sh.c (DEFAULT_STACK_SIZE): Define. (SYMBOL_FUNCDESC_LOCAL): Define. Use it instead of SYMBOL_REFERENCES_LOCAL for function descriptors. (fdpic_object_p): New. (sh_reloc_map): Add FDPIC and movi20 relocations. (sh_elf_info_to_howto, sh_elf_relocate_section): Handle new invalid range. (struct elf_sh_plt_info): Add got20 and short_plt. Update all definitions. (FDPIC_PLT_ENTRY_SIZE, FDPIC_PLT_LAZY_OFFSET): Define. (fdpic_sh_plt_entry_be, fdpic_sh_plt_entry_le, fdpic_sh_plts): New. (FDPIC_SH2A_PLT_ENTRY_SIZE, FDPIC_SH2A_PLT_LAZY_OFFSET): Define. (fdpic_sh2a_plt_entry_be, fdpic_sh2a_plt_entry_le) (fdpic_sh2a_short_plt_be, fdpic_sh2a_short_plt_le, fdpic_sh2a_plts): New. (get_plt_info): Handle FDPIC. (MAX_SHORT_PLT): Define. (get_plt_index, get_plt_offset): Handle short_plt. (union gotref): New. (struct elf_sh_link_hash_entry): Add funcdesc, rename tls_type to got_type and adjust all uses. Add GOT_FUNCDESC. (struct sh_elf_obj_tdata): Add local_funcdesc. Rename local_got_tls_type to local_got_type. (sh_elf_local_got_type): Renamed from sh_elf_local_got_tls_type. All users changed. (sh_elf_local_funcdesc): Define. (struct elf_sh_link_hash_table): Add sfuncdesc, srelfuncdesc, fdpic_p, and srofixup. (sh_elf_link_hash_newfunc): Initialize new fields. (sh_elf_link_hash_table_create): Set fdpic_p. (sh_elf_omit_section_dynsym): New. (create_got_section): Create .got.funcdesc, .rela.got.funcdesc and .rofixup. (allocate_dynrelocs): Allocate local function descriptors and space for R_SH_FUNCDESC-related relocations, and for rofixups. Handle GOT_FUNCDESC. Create fixups. Handle GOT entries which require function descriptors. (sh_elf_always_size_sections): Handle PT_GNU_STACK and __stacksize. (sh_elf_modify_program_headers): New. (sh_elf_size_dynamic_sections): Allocate function descriptors for local symbols. Allocate .got.funcdesc contents. Allocate rofixups. Handle local GOT entries of type GOT_FUNCDESC. Create fixups for local GOT entries. Ensure that FDPIC libraries always have a PLTGOT entry in the .dynamic section. (sh_elf_add_dyn_reloc, sh_elf_got_offset, sh_elf_initialize_funcdesc) (sh_elf_add_rofixup, sh_elf_osec_to_segment) (sh_elf_osec_readonly_p, install_movi20_field): New functions. (sh_elf_relocate_section): Handle new relocations, R_SH_FUNCDESC, R_SH_GOTFUNCDESC and R_SH_GOTOFFFUNCDESC. Use sh_elf_got_offset and .got.plt throughout to find _GLOBAL_OFFSET_TABLE_. Add rofixup read-only section warnings. Handle undefined weak symbols. Generate fixups for R_SH_DIR32 and GOT entries. Check for cross-segment relocations and clear EF_SH_PIC. Handle 20-bit relocations. Always generate R_SH_DIR32 for FDPIC instead of R_SH_RELATIVE. (sh_elf_gc_sweep_hook): Handle R_SH_FUNCDESC, R_SH_GOTOFF20, R_SH_GOTFUNCDESC, R_SH_GOTFUNCDESC20, and R_SH_GOTOFFFUNCDESC. Handle 20-bit relocations. (sh_elf_copy_indirect_symbol): Copy function descriptor reference counts. (sh_elf_check_relocs): Handle new relocations. Make symbols dynamic for FDPIC relocs. Account for rofixups. Error for FDPIC symbol mismatches. Allocate a GOT for R_SH_DIR32. Allocate fixups for R_SH_DIR32. (sh_elf_copy_private_data): Copy PT_GNU_STACK size. (sh_elf_merge_private_data): Copy initial flags. Do not clobber non-mach flags. Set EF_SH_PIC for FDPIC. Reject FDPIC mismatches. (sh_elf_finish_dynamic_symbol): Do not handle got_funcdesc entries here. Rename sgot to sgotplt and srel to srelplt. Handle short_plt, FDPIC descriptors, and got20. Create R_SH_FUNCDESC_VALUE for FDPIC. Use install_movi20_field. Rename srel to srelgot. Always generate R_SH_DIR32 for FDPIC instead of R_SH_RELATIVE. (sh_elf_finish_dynamic_sections): Fill in the GOT pointer in rofixup. Do not fill in reserved GOT entries for FDPIC. Correct DT_PLTGOT. Rename sgot to sgotplt. Assert that the right number of rofixups and dynamic relocations were allocated. (sh_elf_use_relative_eh_frame, sh_elf_encode_eh_address): New. (elf_backend_omit_section_dynsym): Use sh_elf_omit_section_dynsym. (elf_backend_can_make_relative_eh_frame) (elf_backend_can_make_lsda_relative_eh_frame) (elf_backend_encode_eh_address): Define. (TARGET_BIG_SYM, TARGET_BIG_NAME, TARGET_LITTLE_SYM) (TARGET_LITTLE_NAME, elf_backend_modify_program_headers, elf32_bed): Redefine for FDPIC vector. * reloc.c: Add SH FDPIC and movi20 relocations. * targets.c (_bfd_target_vector): Add FDPIC vectors. * configure, bfd-in2.h, libbfd.h: Regenerated. binutils/ * readelf.c (get_machine_flags): Handle EF_SH_PIC and EF_SH_FDPIC. gas/ * config/tc-sh.c (sh_fdpic): New. (sh_check_fixup): Handle relocations on movi20. (parse_exp): Do not reject PIC operators here. (build_Mytes): Check for unhandled PIC operators here. Use sh_check_fixup for movi20. (enum options): Add OPTION_FDPIC. (md_longopts, md_parse_option, md_show_usage): Add --fdpic. (sh_fix_adjustable, md_apply_fix): Handle FDPIC and movi20 relocations. (sh_elf_final_processing): Handle --fdpic. (sh_uclinux_target_format): New. (sh_parse_name): Handle FDPIC relocation operators. * config/tc-sh.h (TARGET_FORMAT): Define specially for TE_UCLINUX. (sh_uclinux_target_format): Declare for TE_UCLINUX. * configure.tgt (sh-*-uclinux* | sh[12]-*-uclinux*): Set em=uclinux. * doc/c-sh.texi (SH Options): Document --fdpic. gas/testsuite/ * gas/sh/basic.exp: Run new tests. Handle uClinux like Linux. * gas/sh/fdpic.d: New file. * gas/sh/fdpic.s: New file. * gas/sh/reg-prefix.d: Force big-endian. * gas/sh/sh2a-pic.d: New file. * gas/sh/sh2a-pic.s: New file. * lib/gas-defs.exp (is_elf_format): Include sh*-*-uclinux*. include/elf/ * sh.h (EF_SH_PIC, EF_SH_FDPIC): Define. (R_SH_FIRST_INVALID_RELOC_6, R_SH_LAST_INVALID_RELOC_6): New. Adjust other invalid ranges. (R_SH_GOT20, R_SH_GOTOFF20, R_SH_GOTFUNCDESC, R_SH_GOTFUNCDESC20) (R_SH_GOTOFFFUNCDESC, R_SH_GOTOFFFUNCDESC20, R_SH_FUNCDESC) (R_SH_FUNCDESC_VALUE): New. ld/ * Makefile.am (ALL_EMULATIONS): Add eshelf_fd.o and eshlelf_fd.o. (eshelf_fd.c, eshlelf_fd.c): New rules. * Makefile.in: Regenerate. * configure.tgt (sh-*-uclinux*): Add shelf_fd and shlelf_fd emulations. * emulparams/shelf_fd.sh: New file. * emulparams/shlelf_fd.sh: New file. * emulparams/shlelf_linux.sh: Update comment. ld/testsuite/ * ld-sh/sh.exp: Handle uClinux like Linux. * lib/ld-lib.exp (is_elf_format): Include sh*-*-uclinux*. * ld-sh/fdpic-funcdesc-shared.d: New file. * ld-sh/fdpic-funcdesc-shared.s: New file. * ld-sh/fdpic-funcdesc-static.d: New file. * ld-sh/fdpic-funcdesc-static.s: New file. * ld-sh/fdpic-gotfuncdesc-shared.d: New file. * ld-sh/fdpic-gotfuncdesc-shared.s: New file. * ld-sh/fdpic-gotfuncdesc-static.d: New file. * ld-sh/fdpic-gotfuncdesc-static.s: New file. * ld-sh/fdpic-gotfuncdesci20-shared.d: New file. * ld-sh/fdpic-gotfuncdesci20-shared.s: New file. * ld-sh/fdpic-gotfuncdesci20-static.d: New file. * ld-sh/fdpic-gotfuncdesci20-static.s: New file. * ld-sh/fdpic-goti20-shared.d: New file. * ld-sh/fdpic-goti20-shared.s: New file. * ld-sh/fdpic-goti20-static.d: New file. * ld-sh/fdpic-goti20-static.s: New file. * ld-sh/fdpic-gotofffuncdesc-shared.d: New file. * ld-sh/fdpic-gotofffuncdesc-shared.s: New file. * ld-sh/fdpic-gotofffuncdesc-static.d: New file. * ld-sh/fdpic-gotofffuncdesc-static.s: New file. * ld-sh/fdpic-gotofffuncdesci20-shared.d: New file. * ld-sh/fdpic-gotofffuncdesci20-shared.s: New file. * ld-sh/fdpic-gotofffuncdesci20-static.d: New file. * ld-sh/fdpic-gotofffuncdesci20-static.s: New file. * ld-sh/fdpic-gotoffi20-shared.d: New file. * ld-sh/fdpic-gotoffi20-shared.s: New file. * ld-sh/fdpic-gotoffi20-static.d: New file. * ld-sh/fdpic-gotoffi20-static.s: New file. * ld-sh/fdpic-plt-be.d: New file. * ld-sh/fdpic-plt-le.d: New file. * ld-sh/fdpic-plt.s: New file. * ld-sh/fdpic-plti20-be.d: New file. * ld-sh/fdpic-plti20-le.d: New file. * ld-sh/fdpic-stack-default.d: New file. * ld-sh/fdpic-stack-size.d: New file. * ld-sh/fdpic-stack.s: New file. |
||
---|---|---|
.. | ||
aix5ppc.sh | ||
aix5rs6.sh | ||
aixppc.sh | ||
aixrs6.sh | ||
alpha.sh | ||
alphavms.sh | ||
arcelf.sh | ||
arm_epoc_pe.sh | ||
arm_wince_pe.sh | ||
armaoutb.sh | ||
armaoutl.sh | ||
armcoff.sh | ||
armelf.sh | ||
armelf_fbsd.sh | ||
armelf_linux.sh | ||
armelf_linux_eabi.sh | ||
armelf_nbsd.sh | ||
armelf_vxworks.sh | ||
armelfb.sh | ||
armelfb_linux.sh | ||
armelfb_linux_eabi.sh | ||
armelfb_nbsd.sh | ||
armnbsd.sh | ||
armnto.sh | ||
armpe.sh | ||
armsymbian.sh | ||
avr1.sh | ||
avr2.sh | ||
avr3.sh | ||
avr4.sh | ||
avr5.sh | ||
avr6.sh | ||
avr25.sh | ||
avr31.sh | ||
avr35.sh | ||
avr51.sh | ||
bfin.sh | ||
coff_i860.sh | ||
coff_sparc.sh | ||
crisaout.sh | ||
criself.sh | ||
crislinux.sh | ||
d10velf.sh | ||
d30v_e.sh | ||
d30v_o.sh | ||
d30velf.sh | ||
delta68.sh | ||
elf32_dlx.sh | ||
elf32_i860.sh | ||
elf32_i960.sh | ||
elf32_sparc.sh | ||
elf32_sparc_sol2.sh | ||
elf32_sparc_vxworks.sh | ||
elf32_spu.sh | ||
elf32_tic6x_be.sh | ||
elf32_tic6x_le.sh | ||
elf32am33lin.sh | ||
elf32b4300.sh | ||
elf32bfinfd.sh | ||
elf32bmip.sh | ||
elf32bmipn32-defs.sh | ||
elf32bmipn32.sh | ||
elf32bsmip.sh | ||
elf32btsmip.sh | ||
elf32btsmipn32.sh | ||
elf32cr16.sh | ||
elf32cr16c.sh | ||
elf32crx.sh | ||
elf32ebmip.sh | ||
elf32ebmipvxworks.sh | ||
elf32elmip.sh | ||
elf32elmipvxworks.sh | ||
elf32fr30.sh | ||
elf32frv.sh | ||
elf32frvfd.sh | ||
elf32i370.sh | ||
elf32ip2k.sh | ||
elf32iq10.sh | ||
elf32iq2000.sh | ||
elf32l4300.sh | ||
elf32lm32.sh | ||
elf32lm32fd.sh | ||
elf32lmip.sh | ||
elf32lppc.sh | ||
elf32lppcnto.sh | ||
elf32lppcsim.sh | ||
elf32lsmip.sh | ||
elf32ltsmip.sh | ||
elf32ltsmipn32.sh | ||
elf32m32c.sh | ||
elf32mb_linux.sh | ||
elf32mcore.sh | ||
elf32mep.sh | ||
elf32microblaze.sh | ||
elf32mipswindiss.sh | ||
elf32moxie.sh | ||
elf32mt.sh | ||
elf32openrisc.sh | ||
elf32ppc.sh | ||
elf32ppc_fbsd.sh | ||
elf32ppccommon.sh | ||
elf32ppclinux.sh | ||
elf32ppcnto.sh | ||
elf32ppcsim.sh | ||
elf32ppcvxworks.sh | ||
elf32ppcwindiss.sh | ||
elf32rx.sh | ||
elf32vax.sh | ||
elf32xc16x.sh | ||
elf32xc16xl.sh | ||
elf32xc16xs.sh | ||
elf32xstormy16.sh | ||
elf32xtensa.sh | ||
elf64_aix.sh | ||
elf64_ia64.sh | ||
elf64_ia64_fbsd.sh | ||
elf64_s390.sh | ||
elf64_sparc.sh | ||
elf64_sparc_fbsd.sh | ||
elf64_sparc_sol2.sh | ||
elf64alpha.sh | ||
elf64alpha_fbsd.sh | ||
elf64alpha_nbsd.sh | ||
elf64bmip-defs.sh | ||
elf64bmip.sh | ||
elf64btsmip.sh | ||
elf64hppa.sh | ||
elf64lppc.sh | ||
elf64ltsmip.sh | ||
elf64mmix.sh | ||
elf64ppc.sh | ||
elf_fbsd.sh | ||
elf_i386.sh | ||
elf_i386_be.sh | ||
elf_i386_chaos.sh | ||
elf_i386_fbsd.sh | ||
elf_i386_ldso.sh | ||
elf_i386_sol2.sh | ||
elf_i386_vxworks.sh | ||
elf_l1om.sh | ||
elf_l1om_fbsd.sh | ||
elf_s390.sh | ||
elf_x86_64.sh | ||
elf_x86_64_fbsd.sh | ||
elf_x86_64_sol2.sh | ||
gld960.sh | ||
gld960coff.sh | ||
h8300.sh | ||
h8300elf.sh | ||
h8300h.sh | ||
h8300helf.sh | ||
h8300hn.sh | ||
h8300hnelf.sh | ||
h8300s.sh | ||
h8300self.sh | ||
h8300sn.sh | ||
h8300snelf.sh | ||
h8300sx.sh | ||
h8300sxelf.sh | ||
h8300sxn.sh | ||
h8300sxnelf.sh | ||
h8500.sh | ||
h8500b.sh | ||
h8500c.sh | ||
h8500m.sh | ||
h8500s.sh | ||
hp3hpux.sh | ||
hp300bsd.sh | ||
hppa64linux.sh | ||
hppaelf.sh | ||
hppalinux.sh | ||
hppanbsd.sh | ||
hppaobsd.sh | ||
i386aout.sh | ||
i386beos.sh | ||
i386bsd.sh | ||
i386coff.sh | ||
i386go32.sh | ||
i386linux.sh | ||
i386lynx.sh | ||
i386mach.sh | ||
i386moss.sh | ||
i386msdos.sh | ||
i386nbsd.sh | ||
i386nto.sh | ||
i386nw.sh | ||
i386pe.sh | ||
i386pe_posix.sh | ||
i386pep.sh | ||
lnk960.sh | ||
m32relf.sh | ||
m32relf_linux.sh | ||
m32rlelf.sh | ||
m32rlelf_linux.sh | ||
m68hc11elf.sh | ||
m68hc11elfb.sh | ||
m68hc12elf.sh | ||
m68hc12elfb.sh | ||
m68k4knbsd.sh | ||
m68kaout.sh | ||
m68kaux.sh | ||
m68kcoff.sh | ||
m68kelf.sh | ||
m68kelfnbsd.sh | ||
m68klinux.sh | ||
m68knbsd.sh | ||
m68kpsos.sh | ||
m88kbcs.sh | ||
maxqcoff.sh | ||
mcorepe.sh | ||
mipsbig.sh | ||
mipsbsd.sh | ||
mipsidt.sh | ||
mipsidtl.sh | ||
mipslit.sh | ||
mipslnews.sh | ||
mipspe.sh | ||
mmo.sh | ||
mn10200.sh | ||
mn10300.sh | ||
msp430all.sh | ||
news.sh | ||
ns32knbsd.sh | ||
or32.sh | ||
or32elf.sh | ||
pc532macha.sh | ||
pdp11.sh | ||
pjelf.sh | ||
pjlelf.sh | ||
ppclynx.sh | ||
ppcmacos.sh | ||
ppcnw.sh | ||
ppcpe.sh | ||
README | ||
riscix.sh | ||
scoreelf.sh | ||
sh.sh | ||
shelf.sh | ||
shelf32.sh | ||
shelf32_linux.sh | ||
shelf32_nbsd.sh | ||
shelf64.sh | ||
shelf64_nbsd.sh | ||
shelf_fd.sh | ||
shelf_linux.sh | ||
shelf_nbsd.sh | ||
shelf_nto.sh | ||
shelf_uclinux.sh | ||
shelf_vxworks.sh | ||
shl.sh | ||
shlelf.sh | ||
shlelf32.sh | ||
shlelf32_linux.sh | ||
shlelf32_nbsd.sh | ||
shlelf64.sh | ||
shlelf64_nbsd.sh | ||
shlelf_fd.sh | ||
shlelf_linux.sh | ||
shlelf_nbsd.sh | ||
shlelf_nto.sh | ||
shlelf_vxworks.sh | ||
shlsymbian.sh | ||
shpe.sh | ||
sparcaout.sh | ||
sparclinux.sh | ||
sparcnbsd.sh | ||
st2000.sh | ||
sun3.sh | ||
sun4.sh | ||
tic3xcoff.sh | ||
tic3xcoff_onchip.sh | ||
tic4xcoff.sh | ||
tic30aout.sh | ||
tic30coff.sh | ||
tic54xcoff.sh | ||
tic80coff.sh | ||
v850.sh | ||
vanilla.sh | ||
vax.sh | ||
vaxnbsd.sh | ||
vsta.sh | ||
vxworks.sh | ||
w65.sh | ||
z80.sh | ||
z8001.sh | ||
z8002.sh |
The files in this directory are read by genscripts.sh as shell commands. They set parameters for the emulations.