source:
scripts/patch/binutils/2.19.1/20-relaxed_ld_powerpc.patch@
579ba7c
Last change on this file since 579ba7c was b2d50f5, checked in by , 15 years ago | |
---|---|
|
|
File size: 1.5 KB |
-
ld/emultempl/ppc32elf.em
This aims to make life a little easier for people building large PowerPC binaries where the PLT is out of reach for 24-bit branches. * emultempl/ppc32elf.em (ppc_before_allocation): Turn on linker relaxation if it might be necessary. diff -Naur binutils-2.19.1.orig/ld/emultempl/ppc32elf.em binutils-2.19.1/ld/emultempl/ppc32elf.em
old new 112 112 } 113 113 } 114 114 } 115 115 116 gld${EMULATION_NAME}_before_allocation (); 117 118 /* Turn on relaxation if executable sections have addresses that 119 might make branches overflow. */ 120 if (!command_line.relax) 121 { 122 bfd_vma low = (bfd_vma) -1; 123 bfd_vma high = 0; 124 asection *o; 125 126 /* Run lang_size_sections (if not already done). */ 127 if (expld.phase != lang_mark_phase_enum) 128 { 129 expld.phase = lang_mark_phase_enum; 130 expld.dataseg.phase = exp_dataseg_none; 131 one_lang_size_sections_pass (NULL, FALSE); 132 lang_reset_memory_regions (); 133 } 134 135 for (o = link_info.output_bfd->sections; o != NULL; o = o->next) 136 { 137 if ((o->flags & (SEC_ALLOC | SEC_CODE)) != (SEC_ALLOC | SEC_CODE)) 138 continue; 139 if (o->size == 0) 140 continue; 141 if (low > o->vma) 142 low = o->vma; 143 if (high < o->vma + o->size - 1) 144 high = o->vma + o->size - 1; 145 } 146 if (high > low && high - low > (1 << 25) - 1) 147 command_line.relax = TRUE; 148 } 116 149 } 117 150 118 151 EOF
Note:
See TracBrowser
for help on using the repository browser.