diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2005-07-25 15:41:08 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2005-07-25 15:41:08 +0000 |
commit | 3b22753a67cf616514de804ef6d5ed5e90a7d883 (patch) | |
tree | 3c29f331caab83e24a8fcc2478fdc5daf2f1a4ab /ld/scripttempl | |
parent | a4d8e49b5087fc4ed7392b451d506ee6a643bae1 (diff) | |
download | gdb-3b22753a67cf616514de804ef6d5ed5e90a7d883.zip gdb-3b22753a67cf616514de804ef6d5ed5e90a7d883.tar.gz gdb-3b22753a67cf616514de804ef6d5ed5e90a7d883.tar.bz2 |
bfd/
2005-07-25 Jan Hubicka <jh@suse.cz>
H.J. Lu <hongjiu.lu@intel.com>
* elf-bfd.h (_bfd_elf_large_com_section): New.
* elf.c (_bfd_elf_large_com_section): New. Defined.
* elf64-x86-64.c (elf64_x86_64_add_symbol_hook): New.
(elf64_x86_64_elf_section_from_bfd_section): New.
(elf64_x86_64_symbol_processing): New.
(elf64_x86_64_common_definition): New.
(elf64_x86_64_common_section_index): New.
(elf64_x86_64_common_section): New.
(elf64_x86_64_merge_symbol): New.
(elf64_x86_64_additional_program_headers): New.
(elf64_x86_64_special_sections): New.
(elf_backend_section_from_bfd_section): New. Defined.
(elf_backend_add_symbol_hook): Likewise.
(elf_backend_common_section_index): Likewise.
(elf_backend_common_section): Likewise.
(elf_backend_common_definition): Likewise.
(elf_backend_merge_symbol): Likewise.
(elf_backend_special_sections): Likewise.
(elf_backend_additional_program_headers): Likewise.
binutils/
2005-07-25 H.J. Lu <hongjiu.lu@intel.com>
* readelf.c (dump_relocations): Handle SHN_X86_64_LCOMMON.
(get_symbol_index_type): Likewise.
(get_elf_section_flags): Handle SHF_X86_64_LARGE.
gas/
2005-07-25 Jan Hubicka <jh@suse.cz>
H.J. Lu <hongjiu.lu@intel.com>
* config/obj-elf.c: Include "elf/x86-64.h" if TC_I386 is
defined.
(elf_com_section_ptr): New.
(elf_begin): Set elf_com_section_ptr to bfd_com_section_ptr.
(elf_common_parse): Make it global. Use elf_com_section_ptr
instead of bfd_com_section_ptr.
(obj_elf_change_section): Handle x86-64 large bss sections.
* config/obj-elf.h (elf_com_section_ptr): New.
(elf_common_parse): New.
* config/tc-i386.c (handle_large_common): New.
(md_pseudo_table): Add "largecomm".
(x86_64_section_letter): New.
(x86_64_section_word): New.
* config/tc-i386.h (x86_64_section_word): New.
(x86_64_section_letter): New.
(md_elf_section_letter): New. Defined.
(md_elf_section_word): Likewise.
include/elf/
2005-07-25 Jan Hubicka <jh@suse.cz>
* x86-64.h (SHN_X86_64_LCOMMON): New.
(SHF_X86_64_LARGE): New.
ld/
2005-07-25 Jan Hubicka <jh@suse.cz>
H.J. Lu <hongjiu.lu@intel.com>
* emulparams/elf_x86_64.sh (LARGE_SECTIONS): New.
* scripttempl/elf.sc: Updated for large section support.
Diffstat (limited to 'ld/scripttempl')
-rw-r--r-- | ld/scripttempl/elf.sc | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc index 2d92e3a..e1ac9e6 100644 --- a/ld/scripttempl/elf.sc +++ b/ld/scripttempl/elf.sc @@ -78,6 +78,9 @@ # .debug_info .gnu.linkonce.wi.foo # .tdata .gnu.linkonce.td.foo # .tbss .gnu.linkonce.tb.foo +# .lrodata .gnu.linkonce.lr.foo +# .ldata .gnu.linkonce.l.foo +# .lbss .gnu.linkonce.lb.foo # # Each of these can also have corresponding .rel.* and .rela.* sections. @@ -157,6 +160,31 @@ if test -z "${SDATA_GOT}"; then SDATA_GOT=" " fi fi +if test -n "${LARGE_SECTIONS}"; then + LBSS=" + .lbss ${RELOCATING-0} : + { + *(.dynlbss) + *(.lbss${RELOCATING+ .lbss.* .gnu.linkonce.lb.*}) + *(LARGE_COMMON) + }" + LARGE_SECTIONS=" + .lrodata ${RELOCATING-0} ${RELOCATING+ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))} : + { + *(.lrodata${RELOCATING+ .lrodata.* .gnu.linkonce.lr.*}) + } + .ldata ${RELOCATING-0} ${RELOCATING+ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))} : + { + *(.ldata${RELOCATING+ .ldata.* .gnu.linkonce.l.*}) + ${RELOCATING+. = ALIGN(. != 0 ? ${ALIGNMENT} : 1);} + }" + REL_LDATA=".rel.ldata ${RELOCATING-0} : { *(.rel.ldata${RELOCATING+ .rel.ldata.* .rel.gnu.linkonce.l.*}) } + .rela.ldata ${RELOCATING-0} : { *(.rela.ldata${RELOCATING+ .rela.ldata.* .rela.gnu.linkonce.l.*}) }" + REL_LBSS=".rel.lbss ${RELOCATING-0} : { *(.rel.lbss${RELOCATING+ .rel.lbss.* .rel.gnu.linkonce.lb.*}) } + .rela.lbss ${RELOCATING-0} : { *(.rela.lbss${RELOCATING+ .rela.lbss.* .rela.gnu.linkonce.lb.*}) }" + REL_LRODATA=".rel.lrodata ${RELOCATING-0} : { *(.rel.lrodata${RELOCATING+ .rel.lrodata.* .rel.gnu.linkonce.lr.*}) } + .rela.lrodata ${RELOCATING-0} : { *(.rela.lrodata${RELOCATING+ .rela.lrodata.* .rela.gnu.linkonce.lr.*}) }" +fi test -n "$SEPARATE_GOTPLT" && SEPARATE_GOTPLT=" " CTOR=".ctors ${CONSTRUCTING-0} : { @@ -274,6 +302,9 @@ eval $COMBRELOCCAT <<EOF ${REL_SBSS2} .rel.bss ${RELOCATING-0} : { *(.rel.bss${RELOCATING+ .rel.bss.* .rel.gnu.linkonce.b.*}) } .rela.bss ${RELOCATING-0} : { *(.rela.bss${RELOCATING+ .rela.bss.* .rela.gnu.linkonce.b.*}) } + ${REL_LDATA} + ${REL_LBSS} + ${REL_LRODATA} EOF if [ -n "$COMBRELOC" ]; then cat <<EOF @@ -397,13 +428,17 @@ cat <<EOF *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. */ + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ ${RELOCATING+. = ALIGN(. != 0 ? ${ALIGNMENT} : 1);} } + ${LBSS} ${OTHER_BSS_SECTIONS} + ${RELOCATING+${OTHER_BSS_END_SYMBOLS}} + ${LARGE_SECTIONS} ${RELOCATING+. = ALIGN(${ALIGNMENT});} ${RELOCATING+_end = .;} - ${RELOCATING+${OTHER_BSS_END_SYMBOLS}} ${RELOCATING+PROVIDE (end = .);} ${RELOCATING+${DATA_SEGMENT_END}} |