ChangeLog-2008 132 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392
  1. 2008-12-29 Arnold Metselaar <arnold.metselaar@planet.nl>
  2. * coff-z80.c (r_imm32): Fix copy-paste bug that caused z80-objdump to
  3. issue warnings about stabs debugging symbols rather than to show them.
  4. 2008-12-23 Jon Beniston <jon@beniston.com>
  5. * Makefile.am: Add LM32 object files and dependencies.
  6. * Makefile.in: Regenerate.
  7. * archures.c: Add LM32 architechiture info.
  8. * targets.c: Likewise.
  9. * reloc.c: Likewise.
  10. * bfd-in2.h: Regenerate.
  11. * config.bfd: Add LM32 targets.
  12. * configure.in: Likewise.
  13. * configure: Regenerate.
  14. * cpu-lm32.c: New file.
  15. * elf32-lm32.c: New file.
  16. 2008-12-23 H.J. Lu <hongjiu.lu@intel.com>
  17. PR ld/7036
  18. * elfxx-ia64.c (elfNN_ia64_relax_section): Assume linker will
  19. always insert 32byte between the .plt and .text sections after
  20. the first relaxation pass.
  21. 2008-12-23 Nick Clifton <nickc@redhat.com>
  22. PR 7093
  23. * elf32-arm.c (bfd_elf32_arm_init_maps): Only process ARM ELF
  24. object files.
  25. 2008-12-23 Tristan Gingold <gingold@adacore.com>
  26. * mach-o.c (bfd_mach_o_make_bfd_section): Use the standard ELF name
  27. .eh_frame for __TEXT.__eh_frame so that it is recognized by gdb.
  28. Use shorter sections name for well known sections.
  29. (bfd_mach_o_scan_read_dylinker): Only put dylinker name in the
  30. section content.
  31. (bfd_mach_o_scan_read_segment): Use shorter sections name for
  32. well known segments.
  33. (bfd_mach_o_scan_read_command): Ignore some new commands.
  34. (bfd_mach_o_openr_next_archived_file): Use more descriptive names
  35. for members filename.
  36. (bfd_mach_o_fat_extract): New function to easily extract members
  37. of a fat binary.
  38. * mach-o.h (bfd_mach_o_load_command_type): Add new constants.
  39. (bfd_mach_o_dylinker_command): Fix comment and reindent.
  40. (bfd_mach_o_fat_extract): New prototype.
  41. 2008-12-23 Johan Olmutz Nielsen <jnielsen@ddci.com>
  42. * coffcode.h (coff_write_object_contents): Always initialise
  43. section.s_page.
  44. 2008-12-23 Andreas Schwab <schwab@suse.de>
  45. * elf32-m68k.c (elf_m68k_discard_copies): Use SYMBOL_CALLS_LOCAL.
  46. (elf_m68k_relocate_section): Use SYMBOL_CALLS_LOCAL and
  47. SYMBOL_REFERENCES_LOCAL.
  48. (elf_m68k_relocate_section): Likewise.
  49. 2008-12-23 Nick Clifton <nickc@redhat.com>
  50. * elf-bfd.h (struct bfd_elf_section_data): Remove indirect_relocs
  51. field.
  52. (_bfd_elf_make_ifunc_reloc_section): Remove prototype.
  53. * elf.c (swap_out_syms): Remove STT_IFUNC support.
  54. (elf_find_function): Likewise.
  55. * elf32-arm.c (arm_elf_find_function): Likewise.
  56. (elf32_arm_adjust_dynamic_symbol): Likewise.
  57. (elf32_arm_swap_symbol_in): Likewise.
  58. (elf32_arm_is_function_type): Likewise.
  59. * elf32-i386.c (is_indirect_symbol): Delete.
  60. (elf_i386_check_relocs): Remove STT_IFUNC support.
  61. (allocate_dynrelocs): Likewise.
  62. (elf_i386_relocate_section): Likewise.
  63. * elf64-x86-64.c (is_indirect_symbol): Delete.
  64. (elf64_x86_64_check_relocs): Remove STT_IFUNC support.
  65. (allocate_dynrelocs): Likewise.
  66. (elf64_x86_64_relocate_section): Likewise.
  67. * elfcode.h (elf_slurp_symbol_table): Likewise.
  68. * elflink.c (_bfd_elf_adjust_symbol): Likewise.
  69. (get_ifunc_reloc_section_name): Delete.
  70. (_bfd_elf_make_ifunc_reloc_section): Delete.
  71. * syms.c (BSF_INDIRECT_FUNCTION): Delete.
  72. (bfd_print_symbol_vandf): Remove STT_IFUNC support.
  73. (bfd_decode_symclass): Likewise.
  74. * bfd-in2.h: Regenerate.
  75. 2008-12-20 Hans-Peter Nilsson <hp@axis.com>
  76. * elf32-cris.c (cris_elf_howto_table): Add entry for R_CRIS_32_IE.
  77. (cris_reloc_map): Similarly.
  78. (cris_elf_relocate_section, cris_elf_gc_sweep_hook)
  79. (cris_elf_check_relocs): Handle R_CRIS_32_IE.
  80. * reloc.c (bfd_reloc_code_type): Add entry for R_CRIS_32_IE.
  81. * bfd-in2.h, libbfd.h: Regenerate.
  82. 2008-12-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
  83. * configure: Regenerate.
  84. 2008-12-17 Hans-Peter Nilsson <hp@axis.com>
  85. * elf32-cris.c (elf_cris_copy_indirect_symbol): Return without
  86. action for symbols other than bfd_link_hash_indirect.
  87. (cris_elf_relocate_section) <R_CRIS_8, R_CRIS_16, R_CRIS_32>: Add missing
  88. gate h != NULL for h->def_regular test.
  89. 2008-12-15 Hans-Peter Nilsson <hp@axis.com>
  90. * elf32-cris.c (elf_cris_copy_indirect_symbol): New function.
  91. (elf_backend_copy_indirect_symbol): Define to above.
  92. * elf32-cris.c (struct elf_cris_pcrel_relocs_copied): New member
  93. r_type. Fix formatting.
  94. (cris_elf_relocate_section) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
  95. <R_CRIS_32_PCREL>: Also break early if the symbol doesn't get
  96. emitted as a dynamic one.
  97. (cris_elf_check_relocs) <R_CRIS_7, R_CRIS_16, R_CRIS_32>: Fork
  98. from PCREL relocs code and simplify; don't fall through.
  99. <R_CRIS_8_PCREL, R_CRIS_16_PCREL, R_CRIS_32_PCREL>: Simplify for
  100. pcrel only. For non-local or overridable symbols in a DSO, always
  101. keep count of relocs, not just when -Bsymbolic. Don't emit
  102. message nor mark as TEXTREL here.
  103. (elf_cris_discard_excess_dso_dynamics): Emit warning and mark as
  104. TEXTREL here, if there are nondiscarded pcrel relocs.
  105. * elf32-cris.c (elf_cris_got_elt_size) <symtab_hdr>: Initialize
  106. using ibfd, not abfd.
  107. 2008-12-11 Alan Modra <amodra@bigpond.net.au>
  108. PR 7041
  109. * elf64-ppc.c (func_desc_adjust): Correct logic making fake function
  110. descriptors. Similarly correct making function descriptors dynamic.
  111. 2008-12-10 Alan Modra <amodra@bigpond.net.au>
  112. * elf32-spu.h (struct spu_elf_params): Add num_regions.
  113. * elf32-spu.c (spu_elf_auto_overlay): Handle multiple overlay regions.
  114. 2008-12-10 Alan Modra <amodra@bigpond.net.au>
  115. * elf32-spu.g (struct spu_elf_params, enum _ovly_flavour): New.
  116. (spu_elf_setup): Declare.
  117. (spu_elf_create_sections, spu_elf_size_stubs): Update prototype.
  118. (spu_elf_build_stubs, spu_elf_check_vma): Likewise.
  119. * elf32-spu.c (struct spu_link_hash_table): Add "params". Remove
  120. various other fields now in "params". Adjust code throughout.
  121. (struct call_info, struct function_info): Move earlier in file.
  122. (struct spu_elf_stack_info): Likewise.
  123. (spu_elf_setup): New function.
  124. (spu_elf_create_sections): Remove args other than "info".
  125. (spu_elf_size_stubs, spu_elf_build_stubs, spu_elf_check_vma): Likewise.
  126. (maybe_needs_stubs): Remove "output_bfd" arg. Adjust all calls.
  127. (interesting_section): Similarly with "obfd" arg.
  128. (needs_ovl_stub): Adjust output_section test.
  129. (allocate_spuear_stubs): Likewise.
  130. (OVL_STUB_SIZE): Don't define.
  131. (ovl_stub_size): New function, use in place of OVL_STUB_SIZE.
  132. (build_stub): Test params->ovly_flavour rather than OVL_STUB_SIZE.
  133. (spu_elf_auto_overlay): Remove args other than "info". Make use
  134. of size returned from spu_elf_load_ovl_mgr.
  135. (spu_elf_stack_analysis): Remove args other than "info".
  136. (spu_elf_relocate_section): Tidy setting of "ea".
  137. 2008-12-10 Alan Modra <amodra@bigpond.net.au>
  138. * elf32-spu.c (find_function_stack_adjust): Don't limit number
  139. of insns scanned. Correct sp tests. Handle "fsmbi" and "andbi".
  140. (mark_detached_root): New function.
  141. (build_call_tree): Call it.
  142. (sort_calls): Don't do void* arithmetic.
  143. (define_ovtab_symbol): Don't abort on symbols defined in linker scripts.
  144. (discover_functions): Consider STT_SECTION symbols too.
  145. (collect_lib_sections): Don't cut short call tree traversal
  146. when function size is too large.
  147. 2008-12-09 Tom Tromey <tromey@redhat.com>
  148. * pef.c (bfd_pef_parse_traceback_table): Add parens to placate gcc
  149. 4.4.
  150. 2008-12-09 Tristan Gingold <gingold@adacore.com>
  151. * cpu-avr.c (compatible): Makes avr-6 compatible only with itself.
  152. 2008-12-04 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
  153. * elf64-s390.c (elf_s390_check_relocs): Initialize
  154. htab->elf.dynobj if necessary.
  155. 2008-12-03 Nick Clifton <nickc@redhat.com>
  156. * syms.c (struct bfd_symbol): Add new flag BSF_INDIRECT_FUNCTION.
  157. Remove redundant flag BFD_FORT_COMM_DEFAULT_VALUE. Renumber flags
  158. to remove gaps.
  159. (bfd_print_symbol_vandf): Return 'i' for BSF_INDIRECT_FUNCTION.
  160. (bfd_decode_symclass): Likewise.
  161. * elf.c (swap_out_syms): Translate BSF_INDIRECT_FUNCTION into
  162. STT_IFUNC.
  163. (elf_find_function): Treat STT_IFUNC in the same way as STT_FUNC.
  164. (_bfd_elf_is_function_type): Likewise.
  165. * elf32-arm.c (arm_elf_find_function): Likewise.
  166. (elf32_arm_adjust_dynamic_symbol): Likewise.
  167. (elf32_arm_swap_symbol_in): Likewise.
  168. (elf32_arm_additional_program_headers): Likewise.
  169. * elf32-i386.c (is_indirect_symbol): New function.
  170. (elf_i386_check_relocs): Also generate dynamic relocs for
  171. relocations against STT_IFUNC symbols.
  172. (allocate_dynrelocs): Likewise.
  173. (elf_i386_relocate_section): Likewise.
  174. * elf64-x86-64.c (is_indirect_symbol): New function.
  175. (elf64_x86_64_check_relocs): Also generate dynamic relocs for
  176. relocations against STT_IFUNC symbols.
  177. (allocate_dynrelocs): Likewise.
  178. (elf64_x86_64_relocate_section): Likewise.
  179. * elfcode.h (elf_slurp_symbol_table): Translate STT_IFUNC into
  180. BSF_INDIRECT_FUNCTION.
  181. * elflink.c (_bfd_elf_adjust_dynamic_reloc_section): Add support
  182. for STT_IFUNC symbols.
  183. (get_ifunc_reloc_section_name): New function.
  184. (_bfd_elf_make_ifunc_reloc_section): New function.
  185. * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs field.
  186. * bfd-in2.h: Regenerate.
  187. 2008-12-02 Tristan Gingold <gingold@adacore.com>
  188. * config.bfd: Add x86_64-*-darwin*
  189. 2008-11-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
  190. * hpux-core.c: Don't include sys/file.h.
  191. 2008-11-28 Joshua Kinard <kumba@gentoo.org>
  192. * aoutx.h (NAME): Add case statements for bfd_mach_mips14000,
  193. bfd_mach_mips16000.
  194. * archures.c (bfd_architecture): Add .#defines for bfd_mach_mips14000,
  195. bfd_mach_mips16000.
  196. * bfd-in2.h: Regenerate.
  197. * cpu-mips.c: Add enums I_mips14000, I_mips16000.
  198. (arch_info_struct): Add refs to R14000, R16000.
  199. * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips14000,
  200. bfd_mach_mips16000.
  201. (mips_mach_extensions): Map R14000, R16000 to R10000.
  202. 2008-11-27 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
  203. * Add PIC support for CR16 target.
  204. * elf32-cr16.c (R_CR16_GOT_REGREL20, R_CR16_GOTC_REGREL20 and
  205. R_CR16_GLOB_DAT): New macros
  206. (cr16_elf_howto_table): Add entries for for R_CR16_GOT_REGREL20,
  207. R_CR16_GOTC_REGREL20 and R_CR16_GLOB_DAT.
  208. (cr16_reloc_map): Ditto
  209. (_bfd_cr16_elf_create_got_section): New function to create GOT section.
  210. (_bfd_cr16_elf_create_dynamic_sections): New function to create dynamic
  211. section.
  212. (_bfd_cr16_elf_adjust_dynamic_symbol): New function to adjust symbol
  213. defined by dynamic object.
  214. (_bfd_cr16_elf_size_dynamic_sections): New function to find the size of
  215. dynamic sections.
  216. (_bfd_cr16_elf_finish_dynamic_symbol): New function to handle dynamic
  217. symbols.
  218. (_bfd_cr16_elf_finish_dynamic_symbol): New function to handle dynamic
  219. sections.
  220. (bfd_cr16_elf32_create_embedded_relocs): New function to create
  221. embedded relocs in .emreloc section in memory for .data.rel section.
  222. (_bfd_cr16_elf_reloc_type_class): New function for classify reloc types.
  223. (cr16_elf_check_relocs): New function for checking reloc types in first
  224. phase.
  225. (cr16_elf_final_link_relocate): Update for handling the new reloc types
  226. R_CR16_GOT_REGREL20 and R_CR16_GOTC_REGREL20.
  227. (elf32_cr16_relax_section): Update relax implementation.
  228. * reloc.c (bfd_reloc_code_type): Add entries for R_CR16_GOT_REGREL20,
  229. R_CR16_GOTC_REGREL20 and R_CR16_GLOB_DAT.
  230. * bfd-in.h (bfd_boolean bfd_cr16_elf32_create_embedded_relocs): Declared
  231. * libbfd.h, bfd-in2.h: Regenerate.
  232. 2008-11-26 Alan Modra <amodra@bigpond.net.au>
  233. PR 7047
  234. * configure.in: Bump version.
  235. * configure: Regenerate.
  236. * elflink.c (_bfd_elf_link_assign_sym_version): Continue matching
  237. against version nodes when a global match is a wildcard. Similarly
  238. continue matching on local wildcard matches, rather than only
  239. continuing for "*". Have any global wildcard match override a
  240. local wildcard match. Correct logic hiding unversioned symbol.
  241. (bfd_elf_size_dynamic_sections): Update for changes to struct
  242. bfd_elf_version_expr.
  243. 2008-11-25 Joel Brobecker <brobecker@adacore.com>
  244. * configure.in: Deactivate large-file support on native x86-solaris
  245. as well unless the user explicitly requested it.
  246. * configure: Regenerate.
  247. 2008-11-25 Joseph Myers <joseph@codesourcery.com>
  248. * elf32-arm.c (elf32_arm_final_link_relocate): Do not turn
  249. branches to undefine weak symbols into branches to the next
  250. instruction if creating PLT entries for those symbols.
  251. 2008-11-25 Nick Clifton <nickc@redhat.com>
  252. * elflink.c (is_reloc_section): New function. Returns true if the
  253. given name matches the name of the reloc-containing section
  254. associated with the given section.
  255. (get_dynamic_reloc_section_name): New function. Computes the name
  256. of the section that contains the dynamic relocs associated with
  257. the given section.
  258. (_bfd_elf_get_dynamic_reloc_section): New function. Returns a
  259. pointer to the section containing the dynamic relocs associated
  260. with the given section.
  261. (_bfd_elf_make_dynamic_reloc_section): New function. Creates a
  262. section to contain the dynamic relocs associated with a given
  263. section.
  264. * elf-bfd.h: Prototype the new functions.
  265. * elf-m10300.c (mn10300_elf_check_relocs): Use new functions.
  266. (mn10300_elf_final_link_relocs): Likewise.
  267. * elf32-arm.c (reloc_section_p): Delete - replaced by new
  268. functions.
  269. (elf32_arm_final_link_relocate): Use new functions.
  270. (elf32_arm_check_relocs): Likewise.
  271. * elf32-cris.c (cris_elf_relocate_section): Likewise.
  272. (elf_cris_check_relocs): Likewise.
  273. * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
  274. * elf32-i370.c (i370_elf_check_relocs): Likewise.
  275. (i370_elf_relocate_section): Likewise.
  276. * elf32-i386.c (elf_i386_check_relocs): Likewise.
  277. * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
  278. (m32r_elf_check_relocs): Likewise.
  279. * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
  280. * elf32_ppc.c (ppc_elf_check_relocs): Likewise.
  281. (ppc_elf_relocate_section): Likewise.
  282. * elf32-s390.c (elf_s390_check_relocs): Likewise.
  283. * elf32-sh.c (sh_elf_relocate_section): Likewise.
  284. (sh_elf_check_relocs): Likewise.
  285. * elf32-vax.c (elf_vax_check_relocs): Likewise.
  286. (elf_vax_relocate_section): Likewise.
  287. * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
  288. * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
  289. * elf64-s390.c (elf_s390_check_relocs): Likewise.
  290. * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
  291. * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
  292. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
  293. * elf32-bfin.c (bfin_check_relocs): Remove redundant local
  294. variable 'sreloc'.
  295. (bfin_relocate_section): Likewise.
  296. * elf32-v850.c (v850_elf_check_relocs): Likewise.
  297. 2008-11-23 Hans-Peter Nilsson <hp@axis.com>
  298. Implement TLS for CRIS.
  299. * elf32-cris.c: Include limits.h.
  300. (TLSHOWTO16): Redefine in terms of and move contents to...
  301. (TLSHOWTO16X): New macro.
  302. (TLSHOWTO16S, LGOT_REG_NDX, LGOT_DTP_NDX, LGOT_ALLOC_NELTS_FOR)
  303. (elf_cris_hash_entry): New macros.
  304. (cris_elf_howto_table): Make R_CRIS_16_DTPREL,
  305. R_CRIS_16_GOT_TPREL, R_CRIS_16_TPREL check overflow for signed,
  306. not unsigned values.
  307. (cris_info_to_howto_rela): Make r_type a enum elf_cris_reloc_type,
  308. not unsigned int.
  309. (struct elf_cris_link_hash_entry): New members reg_got_refcount,
  310. tprel_refcount, and dtp_refcount.
  311. (struct elf_cris_link_hash_table): New member dtpmod_refcount.
  312. (elf_cris_link_hash_newfunc): Initialize new members.
  313. (elf_cris_link_hash_table_create): Similar.
  314. (cris_final_link_relocate, elf_cris_reloc_type_class): Use a
  315. temporary variable when testing the relocation type.
  316. (cris_elf_gc_mark_hook): Ditto. Add default case where needed.
  317. (cris_elf_gc_sweep_hook): Ditto. Handle reference-counting for
  318. the new assembly-generated relocs. Rewrite refcount handling to
  319. set temporary variables to pointers to reloc-specific variables
  320. and entry size and common code for the update.
  321. (additional_relocation_error_msg_count): New variable.
  322. (cris_elf_relocate_section): Use a function-local variable srelgot
  323. for the .rela.got section instead of looking it up for every need.
  324. Make r_type a enum elf_cris_reloc_type, not int. Actually set
  325. symname for non-local symbols. Handle new assembly-generated
  326. relocs. For overflow, emit additional messages for the new 16-bit
  327. relocs as well as R_CRIS_16_GOTPLT and R_CRIS_16_GOT.
  328. (elf_cris_finish_dynamic_symbol): Use elf_cris_finish_dynamic_symbol
  329. instead of plain casts. Check new hash entry member
  330. reg_got_refcount when checking whether to emit a GOT entry.
  331. (elf_cris_finish_dynamic_sections): Update head comment to warn
  332. about emitting relocs here. Use a temporary variable when testing
  333. the relocation type.
  334. (elf_cris_discard_excess_program_dynamics)
  335. (elf_cris_adjust_gotplt_to_got): Handle reference counting change
  336. regarding h->reg_got_refcount.
  337. (cris_elf_check_relocs): Rewrite refcount handling to set
  338. temporary variables and entry size and common code for the update
  339. for local symbols. Use new macro elf_cris_hash_entry. Adjust
  340. allocation for change in reference counting of GOT entries for
  341. local symbols.
  342. (elf_cris_size_dynamic_sections): Adjust calculated size of
  343. .got.plt and .rela.got if we need a GOT entry for a
  344. R_CRIS_DTPMOD relocation.
  345. (elf_cris_got_elt_size): New function.
  346. (elf_backend_got_elt_size): Define.
  347. 2008-11-21 Sterling Augustine <sterling@tensilica.com>
  348. * xtensa-isa.c (xtensa_state_is_shared_or): New function.
  349. 2008-11-21 Hans-Peter Nilsson <hp@axis.com>
  350. * elf-bfd.h (struct elf_backend_data): New member got_elt_size.
  351. (_bfd_elf_default_got_elt_size): Declare.
  352. * elflink.c (struct alloc_got_off_arg): Replace member got_elt_size
  353. by new member info.
  354. (elf_gc_allocate_got_offsets): Adjust for calling bed->got_elt_size
  355. to get the element size instead of using a gofarg entry.
  356. (bfd_elf_gc_common_finalize_got_offsets): Similar.
  357. (_bfd_elf_default_got_elt_size): New function.
  358. * elfxx-target.h: New macro elf_backend_got_elt_size.
  359. (elfNN_bed): Use it.
  360. 2008-11-20 Tristan Gingold <gingold@adacore.com>
  361. * bfdwin.c: Fix comment.
  362. 2008-11-20 Tristan Gingold <gingold@adacore.com>
  363. * bfd.c (is32bit): Use architecture information for non-ELF
  364. targets.
  365. 2008-11-20 Alan Modra <amodra@bigpond.net.au>
  366. * elf32-ppc.c (allocate_dynrelocs): Always use tlsld_got for
  367. TLS_LD even when symbol is used with other TLS reloc types.
  368. (ppc_elf_relocate_section): Bypass symbol checks when using tlsld_got.
  369. Leave addend zero on LD DTPMOD dynamic reloc.
  370. 2008-11-19 Bob Wilson <bob.wilson@acm.org>
  371. * xtensa-modules.c (sysregs): Add MMID, VECBASE, EPC5, EPC6, EPC7,
  372. EXCSAVE5, EXCSAVE6, EXCSAVE7, EPS5, EPS6, EPS7, CPENABLE,
  373. SCOMPARE1, and THREADPTR registers.
  374. (NUM_SYSREGS, MAX_USER_REG): Update.
  375. (states): Change width of INTERRUPT, WindowBase, WindowStart, and
  376. INTENABLE. Add VECBASE, EPC5, EPC6, EPC7, EXCSAVE5, EXCSAVE6,
  377. EXCSAVE7, EPS6, EPS6, EPS7, THREADPTR, CPENABLE, and SCOMPARE1 states.
  378. (NUM_STATES): Update.
  379. (enum xtensa_state_id): Add entries for new states.
  380. (enum xtensa_field_id): Add entries for xt_wbr15_imm and xt_wbr18_imm
  381. fields, along with functions to extract and set them.
  382. (regfiles): Change number of AR registers to 32.
  383. (Operand_ar0_encode, Operand_ar4_encode, Operand_ar8_encode,
  384. Operand_ar12_encode, Operand_ars_entry_encode): Update register mask.
  385. (operands): Add entries for tp7, xt_wbr15_label, xt_wbr18_label,
  386. xt_wbr15_imm, and xt_wbr18_imm operands, along with functions to
  387. encode and decode them.
  388. (enum xtensa_operand_id): Add entries for new operands.
  389. (Iclass_xt_iclass_rfi_stateArgs): Add EPC5, EPC6, EPC7, EPS5, EPS6, and
  390. EPC7 states.
  391. (Iclass_xt_iclass_rfdo_stateArgs): Replace EPC4 and EPS4 by EPC6 and
  392. EPS6, respectively.
  393. (iclasses): Add entries for rur_threadptr, wur_threadptr,
  394. xt_iclass_wsr_176, xt_iclass_rsr_epc5, xt_iclass_wsr_epc5,
  395. xt_iclass_xsr_epc5, xt_iclass_rsr_excsave5, xt_iclass_wsr_excsave5,
  396. xt_iclass_xsr_excsave5, xt_iclass_rsr_epc6, xt_iclass_wsr_epc6,
  397. xt_iclass_xsr_epc6, xt_iclass_rsr_excsave6, xt_iclass_wsr_excsave6,
  398. xt_iclass_xsr_excsave6, xt_iclass_rsr_epc7, xt_iclass_wsr_epc7,
  399. xt_iclass_xsr_epc7, xt_iclass_rsr_excsave7, xt_iclass_wsr_excsave7,
  400. xt_iclass_xsr_excsave7, xt_iclass_rsr_eps5, xt_iclass_wsr_eps5,
  401. xt_iclass_xsr_eps5, xt_iclass_rsr_eps6, xt_iclass_wsr_eps6,
  402. xt_iclass_xsr_eps6, xt_iclass_rsr_eps7, xt_iclass_wsr_eps7,
  403. xt_iclass_xsr_eps7, xt_iclass_rsr_vecbase, xt_iclass_wsr_vecbase,
  404. xt_iclass_xsr_vecbase, xt_iclass_mul16, xt_iclass_wsr_mmid,
  405. xt_iclass_icache_lock, xt_iclass_dcache_lock, xt_iclass_rsr_cpenable,
  406. xt_iclass_wsr_cpenable, xt_iclass_xsr_cpenable, xt_iclass_clamp,
  407. xt_iclass_minmax, xt_iclass_sx, xt_iclass_l32ai, xt_iclass_s32ri,
  408. xt_iclass_s32c1i, xt_iclass_rsr_scompare1, xt_iclass_wsr_scompare1,
  409. xt_iclass_xsr_scompare1, xt_iclass_div, and xt_iclass_mul32, along
  410. with corresponding argument and state argument arrays. Change
  411. number of state arguments for xt_iclass_rfi. Add arguments for
  412. xt_iclass_rfdo.
  413. (enum xtensa_iclass_id): Add entries for new iclasses.
  414. (opcodes): Add entries for RUR_THREADPTR, WUR_THREADPTR, WSR_176,
  415. RSR_EPC5, WSR_EPC5, XSR_EPC5, RSR_EXCSAVE5, WSR_EXCSAVE5, XSR_EXCSAVE5,
  416. RSR_EPC6, WSR_EPC6, XSR_EPC6, RSR_EXCSAVE6, WSR_EXCSAVE6, XSR_EXCSAVE6,
  417. RSR_EPC7, WSR_EPC7, XSR_EPC7, RSR_EXCSAVE7, WSR_EXCSAVE7, XSR_EXCSAVE7,
  418. RSR_EPS5, WSR_EPS5, XSR_EPS5, RSR_EPS6, WSR_EPS6, XSR_EPS6, RSR_EPS7,
  419. WSR_EPS7, XSR_EPS7, RSR_VECBASE, WSR_VECBASE, XSR_VECBASE, MUL16U,
  420. MUL16S, WSR_MMID, IPFL, IHU, IIU, DPFL, DHU, DIU, RSR_CPENABLE,
  421. WSR_CPENABLE, XSR_CPENABLE, CLAMPS, MIN, MAX, MINU, MAXU, SEXT, L32AI,
  422. S32RI, S32C1I, RSR_SCOMPARE1, WSR_SCOMPARE1, XSR_SCOMPARE1, QUOU, QUOS,
  423. REMU, REMS, and MULL opcodes, along with the corresponding functions
  424. to encode them.
  425. (enum xtensa_opcode_id): Add entries for new opcodes.
  426. (Slot_inst_decode): Handle new opcodes.
  427. (Slot_inst_get_field_fns, Slot_inst_set_field_fns): Add entries for
  428. xt_wbr15_imm and xt_wbr18_imm fields.
  429. (Slot_inst16a_get_field_fns, Slot_inst16a_set_field_fns): Likewise.
  430. (Slot_inst16b_get_field_fns, Slot_inst16b_set_field_fns): Likewise.
  431. (xtensa_modules): Update number of fields, operands, iclasses and
  432. opcodes.
  433. 2008-11-19 Nix <nix@esperi.org.uk>
  434. * elf.c (swap_out_syms) [USE_STT_COMMON]: Fix syntax error.
  435. 2008-11-19 Nick Clifton <nickc@redhat.com>
  436. PR 7027
  437. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Treat WPLT30 relocs
  438. against local symbols in 64-bit binaries as if they were WDISP30
  439. relocs.
  440. (_bfd_sparc_elf_relocate_section): Likewise.
  441. 2008-11-18 Catherine Moore <clm@codesourcery.com>
  442. * elf32-arm.c (elf32_arm_merge_eabi_attributes): Merge
  443. half-precision attributes.
  444. (elf32_arm_copy_one_eabi_other_attribute): New.
  445. (elf32_arm_copy_other_attribute_list): New.
  446. 2008-11-18 Nick Clifton <nickc@redhat.com>
  447. * dwarf2.c (read_section): Fix formatting.
  448. (read_n_bytes): Remove unhelpful comment.
  449. (read_indirect_string): Pass symbol table to read_section in case
  450. the .debug_str section needs relocating.
  451. PR 7037
  452. * elf32-cr16.c (cr16_elf_howto_table): Zero the src_mask field of
  453. the reloc descriptions.
  454. 2008-11-14 Eric B. Weddington <eric.weddington@atmel.com>
  455. PR 7022
  456. * elf32-avr.c (bfd_elf_avr_final_write_processing):
  457. Add missing break statements.
  458. 2008-11-14 Bob Wilson <bob.wilson@acm.org>
  459. * xtensa-modules.c (xtensa_state_id): New enum, replacing STATE macros.
  460. (xtensa_field_id, xtensa_regfile_id, xtensa_operand_id)
  461. (xtensa_iclass_id, xtensa_opcode_id): New enums.
  462. Replace hardcoded constants throughout this file with enum values.
  463. 2008-11-14 Nathan Sidwell <nathan@codesourcery.com>
  464. * elf.c (assign_file_positions_for_load_sections): Use header_size
  465. to avoid moving the load address of file headers.
  466. (assign_file_positions_for_load_sections): Set header_size for
  467. segments containing the file header.
  468. 2008-11-14 Tristan Gingold <gingold@adacore.com>
  469. * configure.com: Handle bfd_default_target_size, BFD_HOST_LONG_LONG,
  470. BFD_HOST_64BIT_LONG_LONG, BFD_HOSTPTR_T, bfd_file_ptr.
  471. Generate bfdver.h.
  472. * vms-hdr.c (_bfd_vms_write_hdr): Use strdup/free instead of alloca.
  473. * hosts/alphavms.h: Defines macros to bypass i18n.
  474. * makefile.vms (OBJS): Update file list.
  475. (DEFS): Remove VMS_DEBUG, const, add DEBUGDIR.
  476. (CFLAGS): Update flags.
  477. * bfdio.c (real_fopen): Add code specific to VMS: extract attributes
  478. from modes.
  479. 2008-11-13 Joel Brobecker <brobecker@adacore.com>
  480. * configure.in: Deactivate large-file support on native 32bit
  481. sparc-solaris unless the user explicitly requested it.
  482. * configure: Regenerate.
  483. 2008-11-13 Hans-Peter Nilsson <hp@axis.com>
  484. PR ld/7028
  485. * elf.c (assign_file_positions_for_load_sections): Allocate phrds
  486. with bfd_zalloc2 instead of bfd_alloc2. For the amount, use
  487. the possibly-preset header-size, not the computed one.
  488. 2008-11-13 Alan Modra <amodra@bigpond.net.au>
  489. PR 7023
  490. * elf.c (bfd_section_from_shdr <SHT_SYMTAB>): Fail on invalid sh_info.
  491. 2008-11-11 Alan Modra <amodra@bigpond.net.au>
  492. * elf.c (assign_file_positions_for_non_load_sections): Consolidate
  493. PT_GNU_RELRO handling.
  494. 2008-11-11 Alan Modra <amodra@bigpond.net.au>
  495. PR 7012
  496. * dwarf2.c (find_line): Don't keep stale pointers into realloc'd
  497. memory. Return on errors. Fix memory leak.
  498. (_bfd_dwarf2_cleanup_debug_info): Free dwarf_str_buffer.
  499. 2008-11-10 Andreas Schwab <schwab@suse.de>
  500. PR 7011
  501. * elf.c (assign_file_positions_for_non_load_sections): Handle
  502. PT_GNU_RELRO specially.
  503. 2008-11-06 Joel Sherrill <joel.sherrill@oarcorp.com>
  504. * config.bfd: Add m32c-*-rtems* and m32r-*-rtems*.
  505. 2008-11-06 Tom Tromey <tromey@redhat.com>
  506. * configure, config.in: Rebuild.
  507. * configure.in: Check for fileno.
  508. * bfdio.c (close_on_exec): New function.
  509. (real_fopen): Use it.
  510. (FD_CLOEXEC): New define.
  511. 2008-11-06 Tristan Gingold <gingold@adacore.com>
  512. * mach-o.h (BFD_MACH_O_NO_SECT): Add; reorders the macros.
  513. (BFD_MACH_O_SYM_NTYPE, BFD_MACH_O_SYM_NSECT,
  514. BFD_MACH_O_SYM_NDESC): New macros.
  515. (bfd_mach_o_i386_thread_flavour): Define according to the latest
  516. definition from system header.
  517. (bfd_mach_o_load_command_type): Add BFD_MACH_O_LC_RPATH,
  518. BFD_MACH_O_LC_CODE_SIGNATURE.
  519. (BFD_MACH_O_SECTION_TYPE_MASK, BFD_MACH_O_SECTION_ATTRIBUTES_MASK,
  520. BFD_MACH_O_SECTION_ATTRIBUTES_SYS, BFD_MACH_O_SECTION_ATTRIBUTES_USR,
  521. BFD_MACH_O_S_ATTR_LOC_RELOC, BFD_MACH_O_S_ATTR_EXT_RELOC,
  522. BFD_MACH_O_S_ATTR_SOME_INSTRUCTIONS, BFD_MACH_O_S_ATTR_DEBUG,
  523. BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS): Add.
  524. (bfd_mach_o_segment_command): Add room for a nul terminator in
  525. segname field.
  526. (BFD_MACH_O_PROT_READ, BFD_MACH_O_PROT_WRITE,
  527. BFD_MACH_O_PROT_EXECUTE): Add.
  528. (INDIRECT_SYMBOL_LOCAL): Renames to BFD_MACH_O_INDIRECT_SYMBOL_LOCAL.
  529. (INDIRECT_SYMBOL_ABS): Renames to BFD_MACH_O_INDIRECT_SYMBOL_ABS.
  530. (bfd_mach_o_uuid_command): Add the structure.
  531. (bfd_mach_o_load_command): Add uuid field.
  532. (bfd_get_mach_o_data): New macro.
  533. * mach-o.c (bfd_mach_o_bfd_print_private_bfd_data): New function which
  534. replaces the macro.
  535. (SECTION_TYPE, SECTION_ATTRIBUTES, SECTION_ATTRIBUTES_USR,
  536. S_ATTR_PURE_INSTRUCTIONS, SECTION_ATTRIBUTES_SYS,
  537. S_ATTR_SOME_INSTRUCTIONS, S_ATTR_EXT_RELOC, S_ATTR_LOC_RELOC): Renamed
  538. and moved to mach-o.h.
  539. (N_STAB, N_TYPE, N_EXT, N_UNDF, N_ABS, N_TEXT, N_DATA, N_BSS,
  540. N_SECT, N_INDR): Removed as they duplicated macros in mach-o.h.
  541. (bfd_mach_o_print_symbol): Print much more details.
  542. (bfd_mach_o_make_bfd_section): Add prot argument, use canonical
  543. dwarf name for dwarf sections. Precisely set section flags.
  544. (bfd_mach_o_scan_read_section_32): Add prot argument.
  545. (bfd_mach_o_scan_read_section_64): Ditto.
  546. (bfd_mach_o_scan_read_section): Ditto.
  547. (bfd_mach_o_scan_read_symtab_symbol): Set section for debugging
  548. stabs, set BSF_GLOBAL and LOCAL flags correctly. Fix section
  549. for N_SECT symbols.
  550. (bfd_mach_o_i386_flavour_string): Reindent and adjust for new
  551. names.
  552. (bfd_mach_o_scan_read_symtab): Set HAS_SYMS flags on bfd if there
  553. are symbols.
  554. (bfd_mach_o_scan_read_uuid): New function.
  555. (bfd_mach_o_scan_read_segment): Add a trailing nul. Segments
  556. flags are now simply HAS_CONTENTS. Pass protection to
  557. bfd_mach_o_scan_read_section.
  558. (bfd_mach_o_scan_read_command): Decode UUID command.
  559. (bfd_mach_o_flatten_sections): Add comments. Fix flavour names.
  560. (bfd_mach_o_scan): Set flags according to file type.
  561. (mach_o_fat_archentry): Remove abfd field.
  562. (bfd_mach_o_archive_p): Remove initialization of abfd field.
  563. (bfd_mach_o_openr_next_archived_file): Find previous archive
  564. by position and not by bfd (as former bfds may have been freed).
  565. Give architecture name to archived file.
  566. * mach-o-target.c (TARGET_NAME): Use generic archive for non fat
  567. targets.
  568. 2008-10-30 Jay Krell <jay.krell@cornell.edu>
  569. * cache.c (cache_bread): Cast void * pointer before performing
  570. arithmetic on it.
  571. 2008-10-20 Alan Modra <amodra@bigpond.net.au>
  572. * elf64-ppc.c (ppc64_elf_process_dot_syms): Renamed from
  573. ppc64_elf_check_directives.
  574. * elf32-sh-symbian.c (sh_symbian_process_directives): Combine..
  575. (sh_symbian_check_directives): ..this
  576. (bfd_elf32_sh_symbian_process_directives) ..and this function.
  577. 2008-10-20 Alan Modra <amodra@bigpond.net.au>
  578. * elflink.c (bfd_elf_final_link): Move code reading relocs to..
  579. * elf32-spu.c (spu_elf_count_relocs): ..here. Adjust params.
  580. * elf-bfd.h (struct elf_backend_data): Update elf_backend_count_relocs
  581. params.
  582. 2008-10-20 Alan Modra <amodra@bigpond.net.au>
  583. * elflink.c (bfd_elf_final_link): Use d_ptr rather than d_val
  584. where Elf_Internal_Dyn holds an address.
  585. 2008-10-10 Nathan Froyd <froydnj@codesourcery.com>
  586. * elf32-ppc.c (ppc_elf_merge_obj_attributes): Merge
  587. Tag_GNU_Power_ABI_Struct_Return.
  588. 2008-10-09 Kai Tietz <kai.tietz@onevision.com>
  589. * cofflink.c (_bfd_coff_generic_relocate_section): Dump bfd_vma
  590. sized addresses instead of long sized.
  591. 2008-10-09 Alan Modra <amodra@bigpond.net.au>
  592. * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't attempt to
  593. read plt relocs if no dynamic syms.
  594. 2008-10-08 Nick Clifton <nickc@redhat.com>
  595. * configure.in (ALL_LINGUAS): Add "id".
  596. * configure: Regenerate.
  597. * po/id.po: New Indonesian translation.
  598. 2008-10-08 Alan Modra <amodra@bigpond.net.au>
  599. * elf.c (assign_file_positions_for_load_sections): When checking
  600. a segment for contents, don't assume that a non-TLS nobits section
  601. must only be followed by nobits sections.
  602. 2008-10-04 Hans-Peter Nilsson <hp@axis.com>
  603. * elf32-cris.c (TLSHOWTO32, TLSHOWTO16): New macros.
  604. (cris_elf_howto_table): Add entries for R_CRIS_32_GOT_GD,
  605. R_CRIS_16_GOT_GD, R_CRIS_32_GD, R_CRIS_DTP, R_CRIS_32_DTPREL,
  606. R_CRIS_16_DTPREL, R_CRIS_DTPMOD, R_CRIS_32_GOT_TPREL,
  607. R_CRIS_16_GOT_TPREL, R_CRIS_32_TPREL, R_CRIS_16_TPREL.
  608. (cris_reloc_map): Similarly.
  609. * reloc.c (bfd_reloc_code_type): Add entries for
  610. BFD_RELOC_CRIS_32_GOT_GD, BFD_RELOC_CRIS_16_GOT_GD,
  611. BFD_RELOC_CRIS_32_GD, BFD_RELOC_CRIS_DTP,
  612. BFD_RELOC_CRIS_32_DTPREL, BFD_RELOC_CRIS_16_DTPREL,
  613. BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_GOT_TPREL,
  614. BFD_RELOC_CRIS_16_GOT_TPREL, BFD_RELOC_CRIS_32_TPREL,
  615. BFD_RELOC_CRIS_16_TPREL.
  616. * libbfd.h, bfd-in2.h: Regenerate.
  617. 2008-10-03 Alan Modra <amodra@bigpond.net.au>
  618. PR 6931
  619. * elf.c (bfd_elf_set_group_contents): Assign sh_info for ld -r when
  620. the signature symbol is global.
  621. * elflink.c (elf_link_input_bfd): Ensure group signature symbol
  622. is output when ld -r. Set group sh_info when local.
  623. * linker.c (default_indirect_link_order): Handle group sections
  624. specially.
  625. 2008-09-30 Wesley W. Terpstra <wesley@terpstra.ca>
  626. Nick Clifton <nickc@redhat.com>
  627. * coffgen.c (coff_write_symbols): Check to see if a symbol's flags
  628. do not match it class and if necessary update the class.
  629. (null_error_handler): New function. Suppresses the generation of
  630. bfd error messages.
  631. * coff64-rs6000.c (bfd_xcoff_backend_data): Update comment.
  632. 2008-09-30 Alan Modra <amodra@bigpond.net.au>
  633. * Makefile.am: Run "make dep-am".
  634. * Makefile.in: Regenerate.
  635. 2008-09-30 Alan Modra <amodra@bigpond.net.au>
  636. * elflink.c (elf_link_add_object_symbols): Don't ignore returned
  637. value of check_directives.
  638. 2008-09-29 Peter O'Gorman <pogma@thewrittenword.com>
  639. Steve Ellcey <sje@cup.hp.com>
  640. * configure: Regenerate for new libtool.
  641. * aclocal.m4: Ditto.
  642. * Makefile.in: Ditto.
  643. * doc/Makefile.in: Ditto.
  644. 2008-09-29 Alan Modra <amodra@bigpond.net.au>
  645. PR 6789
  646. * elf.c (assign_file_positions_for_load_sections): Call
  647. _bfd_elf_map_sections_to_segments, not elf_modify_segment_map.
  648. (get_program_header_size): Protect against NULL info.
  649. (_bfd_elf_map_sections_to_segments): Likewise.
  650. * elf32-spu.c (spu_elf_additional_program_headers): Likewise.
  651. 2008-09-29 Nick Clifton <nickc@redhat.com>
  652. * po/vi.po: Updated Vietnamese translation.
  653. 2008-09-28 Alan Modra <amodra@bigpond.net.au>
  654. * elf.c (_bfd_elf_init_private_section_data): Tweak union copy.
  655. (bfd_section_from_shdr): Don't change SHT_GROUP section name.
  656. * elflink.c (section_signature): New function.
  657. (_bfd_elf_section_already_linked): Use it.
  658. 2008-09-19 Alan Modra <amodra@bigpond.net.au>
  659. * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Handle vxworks
  660. _GLOBAL_OFFSET_TABLE_ in .got.plt section. Add BFD_ASSERTs.
  661. 2008-09-17 Bob Wilson <bob.wilson@acm.org>
  662. * elf32-xtensa.c (elf_xtensa_check_relocs): Check for negative
  663. refcount.
  664. 2008-09-17 Jan Kratochvil <jan.kratochvil@redhat.com>
  665. PR 6893 - Do not consider FDEs for discarded sections as invalid.
  666. * elf-eh-frame.c (_bfd_elf_parse_eh_frame): New REQUIRE_CLEARED_RELOCS.
  667. Consider FDEs with cleared relocations as valid and ignorable.
  668. 2008-09-16 H.J. Lu <hongjiu.lu@intel.com>
  669. PR ld/6877
  670. * elflink.c (_bfd_elf_merge_symbol): Allow a common symbol to
  671. override the function in a shared library.
  672. 2008-09-16 Alan Modra <amodra@bigpond.net.au>
  673. PR 6844
  674. * elf32-ppc.c (SYM_VAL): Define. Use throughout to find symbol vma.
  675. (ppc_elf_relocate_section): Correct GOT offset calculation.
  676. (ppc_elf_finish_dynamic_symbol): Use PPC_HA and PPC_LO.
  677. (ppc_elf_finish_dynamic_sections): Likewise. Error if
  678. htab->elf.hgot symbol is not defined in htab->got section.
  679. 2008-09-16 Alan Modra <amodra@bigpond.net.au>
  680. PR 6888
  681. * elf32-ppc.c (ppc_elf_relocate_section): Handle NULL symbol section
  682. on R_PPC_TOC16, R_PPC_SDAREL16, R_PPC_EMB_SDA2REL, R_PPC_EMB_SDA21,
  683. R_PPC_EMB_RELSDA, R_PPC_SECTOFF* relocs.
  684. 2008-09-11 Jan Kratochvil <jan.kratochvil@redhat.com>
  685. Fix loading large elf64 binaries on 32bit hosts.
  686. * configure.in: Call AC_SYS_LARGEFILE.
  687. * config.in: Regenerate.
  688. * configure: Regenerate.
  689. 2008-09-08 Tom Tromey <tromey@redhat.com>
  690. * elfxx-mips.c (mips16_stub_symndx) <sec>: Mark argument as
  691. unused.
  692. 2008-09-08 H.J. Lu <hongjiu.lu@intel.com>
  693. Daniel Jacobowitz <dan@codesourcery.com>
  694. PR ld/3191
  695. * dwarf2.c (struct adjusted_section): Renamed from struct
  696. loadable_section.
  697. (struct dwarf2_debug): Adjust for renaming. Add version field.
  698. (read_attribute_value): Correctly handle DW_FORM_ref_addr for
  699. DWARF3.
  700. (find_abstract_instance_name): Pass a pointer to
  701. attribute instead of offset. For DW_FORM_ref_addr, get the
  702. entry at the offset from the .debug_info section.
  703. (scan_unit_for_symbols): Update.
  704. (parse_comp_unit): Allow DWARF3. Save the version.
  705. (unset_sections): Update for renaming.
  706. (place_sections): Likewise. Set new VMAs for DWARF sections
  707. also.
  708. 2008-09-08 Tristan Gingold <gingold@adacore.com>
  709. * configure.in: Update version to 2.19.50
  710. * configure: Regenerated.
  711. 2008-09-05 Daniel Jacobowitz <dan@codesourcery.com>
  712. * dwarf2.c: Change leading whitespace to tabs.
  713. 2008-09-05 Tristan Gingold <gingold@adacore.com>
  714. Add MacOSX 64 bits support.
  715. * mach-o.h (bfd_mach_o_ppc_thread_flavour): Add
  716. BFD_MACH_O_PPC_THREAD_STATE_64.
  717. (bfd_mach_o_i386_thread_flavour): Add BFD_MACH_O_x86_THREAD_STATE64,
  718. BFD_MACH_O_x86_FLOAT_STATE64, BFD_MACH_O_x86_EXCEPTION_STATE64,
  719. BFD_MACH_O_x86_THREAD_STATE, BFD_MACH_O_x86_FLOAT_STATE,
  720. BFD_MACH_O_x86_EXCEPTION_STATE.
  721. (bfd_mach_o_load_command_type): Add
  722. BFD_MACH_O_LC_SEGMENT_64, BFD_MACH_O_LC_ROUTINES_64,
  723. BFD_MACH_O_LC_UUID.
  724. (BFD_MACH_O_CPU_IS64BIT): Added.
  725. (bfd_mach_o_cpu_type): Add BFD_MACH_O_CPU_TYPE_POWERPC_64,
  726. BFD_MACH_O_CPU_TYPE_X86_64.
  727. (bfd_mach_o_header): Add version field.
  728. (bfd_mach_o_section) Add reserved3 field.
  729. (bfd_mach_o_segment_command): Add initprot and maxprot fields.
  730. * mach-o.c (N_TEXT, N_DATA, N_BSS): Added.
  731. (bfd_mach_o_version): New function.
  732. (bfd_mach_o_valid): Handle 64bits cpus.
  733. (bfd_mach_o_write_header): handler 64bits headers.
  734. (bfd_mach_o_scan_write_section_32, bfd_mach_o_scan_write_section_64):
  735. New functions (from bfd_mach_o_scan_write_section) to handle both
  736. flavors.
  737. (bfd_mach_o_scan_write_segment): Parameter wide added to support
  738. both flavors.
  739. (bfd_mach_o_write_contents): Support both flavors.
  740. (bfd_mach_o_read_header): Ditto.
  741. (bfd_mach_o_scan_read_section_32, bfd_mach_o_scan_read_section_64):
  742. New functions (from bfd_mach_o_scan_read_section) to support both
  743. flavors.
  744. (bfd_mach_o_scan_read_symtab_symbol): Support both flavors.
  745. (bfd_mach_o_scan_read_symtab): Ditto.
  746. (bfd_mach_o_scan_read_segment): Parameter wide added to support
  747. both flavors.
  748. (bfd_mach_o_scan_read_segment_32, bfd_mach_o_scan_read_segment_64):
  749. New functions to call bfd_mach_o_scan_read_segment.
  750. (bfd_mach_o_flatten_sections): Support both flavors.
  751. (bfd_mach_o_scan_start_address): Ditto.
  752. (bfd_mach_o_scan): Ditto.
  753. (bfd_mach_o_lookup_section): Ditto.
  754. 2008-08-27 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
  755. * elf-hppa.h (elf_hppa_reloc_final_type): Handle R_PARISC_GPREL64,
  756. R_PARISC_SEGREL32 and R_PARISC_SEGREL64.
  757. * som.c (som_fixup_formats): Add R_DATA_GPREL fixup.
  758. (som_hppa_howto_table): Likewise.
  759. (hppa_som_gen_reloc_type): In case R_HPPA_GOTOFF, detect R_DATA_GPREL
  760. final type.
  761. (som_write_fixups): Handle R_DATA_GPREL.
  762. 2008-08-26 Nick Clifton <nickc@redhat.com>
  763. * elf32-arm.c: Fix up comment describing Thumb to ARM interworking
  764. stub.
  765. 2008-08-25 Christophe Lyon <christophe.lyon@st.com>
  766. * elf32-arm.c (arm_thumb_arm_v4t_short_branch_stub): Define.
  767. (elf32_arm_stub_type): Add arm_thumb_arm_v4t_stub_short_branch.
  768. (arm_type_of_stub): Handle armv4t short branches. Update
  769. prototype.
  770. (arm_stub_is_thumb): Handle arm_thumb_arm_v4t_stub_short_branch.
  771. (arm_build_one_stub): Likewise.
  772. (arm_size_one_stub): Likewise.
  773. (elf32_arm_size_stubs): Use new arm_type_of_stub prototype.
  774. (arm_map_one_stub): Handle arm_thumb_arm_v4t_stub_short_branch.
  775. 2008-08-24 Andreas Schwab <schwab@suse.de>
  776. * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Do proper
  777. extension when calculating difference of offsets.
  778. 2008-08-24 Alan Modra <amodra@bigpond.net.au>
  779. * configure.in: Update a number of obsolete autoconf macros.
  780. * aclocal.m4: Regenerate.
  781. 2008-08-23 Andreas Schwab <schwab@suse.de>
  782. * opncls.c (find_separate_debug_file): Use the canonical
  783. absolute name of the bfd object for finding the debug file in
  784. the global debugfile directory.
  785. 2008-08-22 Jakub Jelinek <jakub@redhat.com>
  786. Fix PR ld/3290 regression for cross-files DW_FORM_ref_addr relocations.
  787. * elflink.c (elf_link_add_object_symbols): Make debug symbols local
  788. now only for non-RELOCATABLE targets.
  789. 2008-08-20 Bob Wilson <bob.wilson@acm.org>
  790. * elf-bfd.h (elf_object_id): Add XTENSA_ELF_TDATA.
  791. * elf32-xtensa.c (elf_howto_table): Add TLS relocations.
  792. (elf_xtensa_reloc_type_lookup): Likewise.
  793. (TCB_SIZE): Define.
  794. (elf_xtensa_link_hash_entry): New.
  795. (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE, GOT_TLS_ANY): Define.
  796. (elf_xtensa_hash_entry): Define.
  797. (elf_xtensa_obj_tdata): New.
  798. (elf_xtensa_tdata): Define.
  799. (elf_xtensa_local_got_tls_type): Define.
  800. (elf_xtensa_local_tlsfunc_refcounts): Define.
  801. (is_xtensa_elf): Define.
  802. (elf_xtensa_mkobject): New.
  803. (elf_xtensa_link_hash_table): Add tlsbase field.
  804. (elf_xtensa_link_hash_newfunc): New.
  805. (elf_xtensa_link_hash_table_create): Use elf_xtensa_link_hash_newfunc.
  806. Create an entry for "_TLS_MODULE_BASE_" and save it in tlsbase field.
  807. (elf_xtensa_copy_indirect_symbol): New.
  808. (elf_xtensa_check_relocs): Rewrite to handle TLS relocations.
  809. (elf_xtensa_gc_sweep_hook): Likewise.
  810. (elf_xtensa_allocate_dynrelocs): Optimize away GOT entries for
  811. TLSDESC_FN relocations when an IE reference is seen.
  812. (elf_xtensa_allocate_local_got_size): Likewise.
  813. (elf_xtensa_always_size_sections): New.
  814. (dtpoff_base, tpoff): New.
  815. (elf_xtensa_do_reloc): Handle TLS relocations.
  816. (replace_tls_insn): New.
  817. (IS_XTENSA_TLS_RELOC): Define.
  818. (elf_xtensa_relocate_section): Handle TLS relocations.
  819. (get_indirect_call_dest_reg): New.
  820. (bfd_elf32_mkobject): Define.
  821. (elf_backend_always_size_sections): New.
  822. (elf_backend_copy_indirect_symbol): New.
  823. * reloc.c (BFD_RELOC_XTENSA_TLSDESC_FN, BFD_RELOC_XTENSA_TLSDESC_ARG)
  824. (BFD_RELOC_XTENSA_TLS_DTPOFF, BFD_RELOC_XTENSA_TLS_TPOFF)
  825. (BFD_RELOC_XTENSA_TLS_FUNC, BFD_RELOC_XTENSA_TLS_ARG)
  826. (BFD_RELOC_XTENSA_TLS_CALL): New.
  827. * bfd-in2.h: Regenerate.
  828. * libbfd.h: Regenerate.
  829. 2008-08-18 Richard Sandiford <rdsandiford@googlemail.com>
  830. * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Copy MIPS16
  831. stub information.
  832. 2008-08-17 Nick Clifton <nickc@redhat.com>
  833. * elf32-arm.c: Tidy up the code.
  834. (bfd_elf32_arm_allocate_interworking_sections): Move common code
  835. into...
  836. (arm_allocate_glue_section_space): ... New function.
  837. (bfd_elf32_arm_add_glue_sections_to_bfd): Move common code
  838. into...
  839. (arm_make_glue_section): ... New function.
  840. * elfxx-mips.c (_bfd_mips_elf_check_relocs): Handle the situation
  841. where the sym_hashes are not available.
  842. 2008-08-17 Alan Modra <amodra@bigpond.net.au>
  843. * bfd.c (struct _bfd): Correct outsymbols comment.
  844. * bfd-in2.h: Regenerate.
  845. * linker.c (bfd_generic_link_read_symbols): Renamed from..
  846. (generic_link_read_symbols): ..this, and made global.
  847. 2008-08-15 Alan Modra <amodra@bigpond.net.au>
  848. PR 6526
  849. * configure.in: Invoke AC_USE_SYSTEM_EXTENSIONS.
  850. * Makefile.in: Regenerate.
  851. * aclocal.m4: Regenerate.
  852. * config.in: Regenerate.
  853. * configure: Regenerate.
  854. 2008-08-14 Jaka Močnik <jaka@xlab.si>
  855. * coffgen.c (coff_find_nearest_line): Correct cached line index.
  856. 2008-08-12 Alan Modra <amodra@bigpond.net.au>
  857. * elf32-ppc.c (allocate_dynrelocs): Ignore dyn_relocs when
  858. !dynamic_sections_created. Don't make symbols with got
  859. references dynamic if !dynamic_sections_created.
  860. * elf64-ppc.c (allocate_dynrelocs): Likewise. Alloc dynamic
  861. relocs on undefined symbols.
  862. (ppc64_elf_relocate_section): Allow dynamic relocs on
  863. undefined symbols.
  864. 2008-08-11 Alan Modra <amodra@bigpond.net.au>
  865. * elf64-ppc.c (toc_adjusting_stub_needed): Any call via the plt
  866. needs r2 valid, not just those to external syms.
  867. 2008-08-09 Pedro Alves <pedro@codesourcery.com>
  868. * archive.c (_bfd_archive_bsd_update_armap_timestamp): Cast stat
  869. st_mtime to long before comparison.
  870. 2008-08-08 Anatoly Sokolov <aesok@post.ru>
  871. * archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
  872. bfd_mach_avr51): New.
  873. * bfd-in2.h: Regenerate.
  874. * cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
  875. architectures. Change comments to match architecture comments in GCC.
  876. (compatible): Add test for new AVR architectures.
  877. * elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
  878. bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
  879. (elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
  880. E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
  881. 2008-08-08 Richard Sandiford <rdsandiford@googlemail.com>
  882. Daniel Jacobowitz <dan@codesourcery.com>
  883. Catherine Moore <clm@codesourcery.com>
  884. Mark Shinwell <shinwell@codesourcery.com>
  885. Maxim Kuvyrkov <maxim@codesourcery.com>
  886. * elf32-mips.c (mips_vxworks_copy_howto_rela): Replace with...
  887. (elf_mips_copy_howto): ...this howto. Clear the size fields.
  888. (mips_vxworks_jump_slot_howto_rela): Replace with...
  889. (elf_mips_jump_slot_howto): ...this howto.
  890. (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS_COPY
  891. and BFD_RELOC_MIPS_JUMP_SLOT.
  892. (bfd_elf32_bfd_reloc_name_lookup): Handle "R_MIPS_COPY" and
  893. "R_MIPS_JUMP_SLOT".
  894. (mips_elf32_rtype_to_howto): Handle R_MIPS_COPY and R_MIPS_JUMP_SLOT.
  895. (elf_backend_plt_readonly): Define.
  896. (elf_backend_plt_sym_val): Define for non-VxWorks targets.
  897. (mips_vxworks_bfd_reloc_type_lookup): Delete.
  898. (mips_vxworks_bfd_reloc_name_lookup): Likewise.
  899. (mips_vxworks_rtype_to_howto): Likewise.
  900. (elf_backend_want_dynbss): Don't define for VxWorks.
  901. (elf_backend_plt_readonly): Likewise.
  902. (bfd_elf32_bfd_reloc_type_lookup): Likewise.
  903. (bfd_elf32_bfd_reloc_name_lookup): Likewise.
  904. (elf_backend_mips_rtype_to_howto): Likewise.
  905. (elf_backend_adjust_dynamic_symbol): Likewise.
  906. (elf_backend_got_symbol_offset): Don't define.
  907. * elfn32-mips.c (elf_mips_copy_howto, elf_mips_jump_slot_howto): New.
  908. (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS_COPY
  909. and BFD_RELOC_MIPS_JUMP_SLOT.
  910. (bfd_elf32_bfd_reloc_name_lookup): Handle "R_MIPS_COPY" and
  911. "R_MIPS_JUMP_SLOT".
  912. (mips_elf32_n32_rtype_to_howto): Handle R_MIPS_COPY and
  913. R_MIPS_JUMP_SLOT.
  914. (elf_backend_rela_plts_and_copies_p, elf_backend_plt_readonly)
  915. (elf_backend_plt_sym_val): Define.
  916. * elf64-mips.c (elf_mips_copy_howto, elf_mips_jump_slot_howto): New.
  917. (bfd_elf64_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS_COPY
  918. and BFD_RELOC_MIPS_JUMP_SLOT.
  919. (bfd_elf64_bfd_reloc_name_lookup): Handle "R_MIPS_COPY" and
  920. "R_MIPS_JUMP_SLOT".
  921. (mips_elf64_rtype_to_howto): Handle R_MIPS_COPY and R_MIPS_JUMP_SLOT.
  922. (elf_backend_rela_plts_and_copies_p, elf_backend_plt_readonly)
  923. (elf_backend_plt_sym_val): Define.
  924. * elfxx-mips.h (_bfd_mips_vxworks_adjust_dynamic_symbol): Delete.
  925. (_bfd_mips_elf_use_plts_and_copy_relocs, _bfd_mips_elf_init_stubs)
  926. (_bfd_mips_elf_plt_sym_val, _bfd_mips_post_process_headers): Declare.
  927. * elfxx-mips.c (mips_elf_la25_stub): New structure.
  928. (LA25_LUI, LA25_J, LA25_ADDIU): New macros.
  929. (mips_elf_link_hash_entry): Add "la25_stubs", "has_static_relocs"
  930. and "has_nonpic_branches" fields. Remove "is_relocation_target" and
  931. "is_branch_target".
  932. (mips_elf_link_hash_table): Add blank lines. Add
  933. "use_plts_and_copy_relocs", "reserved_gotno", "strampoline",
  934. "la25_stubs" and "add_stub_section" fields.
  935. (mips_htab_traverse_info): New structure.
  936. (PIC_OBJECT_P, MIPS_ELF_LOAD_WORD): New macros.
  937. (MIPS_RESERVED_GOTNO): Delete.
  938. (mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry)
  939. (mips_n64_exec_plt0_entry, mips_exec_plt_entry): New tables.
  940. (mips_elf_link_hash_newfunc): Update after the changes to
  941. mips_elf_link_hash_entry.
  942. (mips_elf_check_mips16_stubs): Replace the DATA parameter with
  943. an INFO parameter. Don't look through warnings symbols here;
  944. do it in mips_elf_check_symbols instead.
  945. (mips_elf_create_stub_symbol): New function.
  946. (mips_elf_la25_stub_hash, mips_elf_la25_stub_eq): New functions.
  947. (_bfd_mips_elf_init_stubs, mips_elf_local_pic_function_p): Likewise.
  948. (mips_elf_add_la25_intro, mips_elf_add_la25_trampoline): Likewise.
  949. (mips_elf_add_la25_stub, mips_elf_check_symbols): New functions.
  950. (mips_elf_gotplt_index): Check for VxWorks.
  951. (mips_elf_output_dynamic_relocation): Take the relocation index
  952. as an extra parameter. Do not increment reloc_count here.
  953. (mips_elf_initialize_tls_slots): Update the calls to
  954. mips_elf_output_dynamic_relocation accordingly.
  955. (mips_elf_multi_got): Use htab->reserved_gotno instead of
  956. MIPS_RESERVED_GOTNO.
  957. (mips_elf_create_got_section): Don't allocate reserved GOT
  958. entries here. Unconditionally create .got.plt, but don't
  959. set its alignment here.
  960. (mips_elf_relocation_needs_la25_stub): New function.
  961. (mips_elf_calculate_relocation): Redirect branches and jumps to
  962. a non-PIC stub if one exists. Check !h->has_static_relocs instead
  963. of !htab->is_vxworks when deciding whether to create dynamic
  964. relocations for R_MIPS_32, R_MIPS_REL32 and R_MIPS_64.
  965. (_bfd_mips_elf_create_dynamic_sections): Unconditionally call
  966. _bfd_elf_create_dynamic_sections. Unconditionally set up
  967. htab->splt and htab->sdynbss. Set htab->srelplt to ".rel.plt"
  968. if !htab->is_vxworks. Add non-VxWorks values of
  969. htab->plt_header_size and htab->plt_entry_size.
  970. (_bfd_mips_elf_check_relocs): Set pointer_equality_needed for
  971. non-branch static relocations. Set has_nonpic_branches when an la25
  972. stub might be required. Set can_make_dynamic_p to TRUE if R_MIPS_32,
  973. R_MIPS_REL32 and R_MIPS_64 relocations can be made dynamic,
  974. rather than duplicating the condition. Do not make them dynamic
  975. for read-only sections in non-PIC executable objects.
  976. Do not protect this code with dynobj == NULL || htab->sgot == NULL;
  977. handle each group of cases separately. Add a default case that
  978. sets has_static_relocs for non-GOT relocations that cannot be
  979. made dynamic. Don't set is_relocation_target and is_branch_target.
  980. Reject non-PIC static relocations in shared objects.
  981. (_bfd_mips_vxworks_adjust_dynamic_symbol): Fold into...
  982. (_bfd_mips_elf_adjust_dynamic_symbol): ...here, using
  983. htab->use_plts_and_copy_relocs instead of htab->is_vxworks
  984. to select PLT and copy-reloc handling. Set the alignment of
  985. .plt and .got.plt when allocating the first entry. Generalize
  986. code to handle REL as well as RELA sections and 64-bit as well as
  987. 32-bit GOT entries. Complain if we find a static-only reloc
  988. against an externally-defined symbol and if we cannot create
  989. dynamic relocations for it. Allocate copy relocs using
  990. mips_elf_allocate_dynamic_relocations on non-VxWorks targets.
  991. Set possibly_dynamic_relocs to 0 when using PLTs or copy relocs.
  992. Skip reserved .got.plt entries.
  993. (_bfd_mips_elf_always_size_sections): Use mips_elf_check_symbols
  994. instead of mips_elf_check_mips16_stubs to process each symbol.
  995. Do the traversal for relocatable objects too.
  996. (mips_elf_lay_out_got): Use htab->reserved_gotno instead of
  997. MIPS_RESERVED_GOTNO.
  998. (_bfd_mips_elf_size_dynamic_sections): Exclude sdynbss if it
  999. is empty. Extend the DT_PLTREL, DT_JMPREL and DT_PLTRELSZ handling
  1000. to non-VxWorks targets. Only add DT_REL{,A}, DT_REL{,A}SZ and
  1001. DT_REL{,A}ENT if .rel.dyn is nonempty. Create a symbol for the
  1002. PLT. Allocate a nop at the end of the PLT. Allocate DT_MIPS_PLTGOT.
  1003. (mips_elf_create_la25_stub_info): New function.
  1004. (_bfd_mips_elf_finish_dynamic_symbol): Write out PLT entries
  1005. and copy relocs where necessary. Check pointer_equality_needed.
  1006. (mips_finish_exec_plt): New function.
  1007. (_bfd_mips_elf_finish_dynamic_sections): Always set DT_PLTGOT
  1008. to the beginning of htab->sgot. Use htab->reserved_gotno instead
  1009. of MIPS_RESERVED_GOTNO. Assert htab->use_plts_and_copy_relocs
  1010. instead of htab->is_vxworks for DT_PLTREL, DT_PLTRELSZ and DT_JMPREL.
  1011. Set DT_PLTREL to DT_REL instead of DT_RELA on non-VxWorks targets.
  1012. Use mips_finish_exec_plt to create non-VxWorks PLT headers. Set
  1013. DT_MIPS_PLTGOT.
  1014. (_bfd_mips_elf_copy_indirect_symbol): Copy has_static_relocs
  1015. from the indirect symbol to the direct symbol. Also copy
  1016. has_nonpic_branches for indirect symbols.
  1017. (_bfd_mips_elf_get_target_dtag): Handle DT_MIPS_PLTGOT and
  1018. DT_MIPS_RWPLT.
  1019. (_bfd_mips_elf_link_hash_table_create): Initialize the new
  1020. mips_elf_link_hash_table fields.
  1021. (_bfd_mips_vxworks_link_hash_table_create): Set
  1022. use_plts_and_copy_relocs to TRUE. Use TRUE rather than 1
  1023. when setting is_vxworks.
  1024. (_bfd_mips_elf_use_plts_and_copy_relocs): New function.
  1025. (_bfd_mips_elf_final_link): Call mips_elf_create_la25_stub for
  1026. each la25_stub.
  1027. (_bfd_mips_elf_merge_private_bfd_data): Treat dynamic objects
  1028. as PIC. Generalize message about linking PIC and non-PIC.
  1029. (_bfd_mips_elf_plt_sym_val, _bfd_mips_post_process_headers): New
  1030. functions.
  1031. * reloc.c: Update comment near BFD_RELOC_MIPS_JUMP_SLOT.
  1032. * bfd-in2.h: Regenerated.
  1033. 2008-08-08 Alan Modra <amodra@bigpond.net.au>
  1034. * elf.c (bfd_elf_get_elf_syms): Don't leak memory on error.
  1035. * elflink.c (_bfd_elf_link_read_relocs): bfd_release on error.
  1036. (elf_link_add_object_symbols): Don't leak memory on error.
  1037. (bfd_elf_size_dynsym_hash_dynstr): Likewise.
  1038. (elf_fixup_link_order): Free sections.
  1039. 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
  1040. * elf-bfd.h (elf_backend_data): Add a "rela_plts_and_copies_p" field.
  1041. * elfxx-target.h (elf_backend_rela_plts_and_copies_p): New macro.
  1042. (elfNN_bed): Use it.
  1043. * elf.c (_bfd_elf_get_synthetic_symtab): Use rela_plts_and_copies_p
  1044. instead of default_use_rela_p to choose between ".rel.plt" and
  1045. ".rela.plt".
  1046. * elflink.c (_bfd_elf_create_dynamic_sections): Use
  1047. rela_plts_and_copies_p instead of default_use_rela_p to choose
  1048. between ".rel.plt" and ".rela.plt", and between ".rel.bss" and
  1049. ".rela.bss".
  1050. 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
  1051. * elf-bfd.h (MIPS_ELF_TDATA): New elf_object_id.
  1052. * elf32-mips.c (bfd_elf32_mkobject): Define.
  1053. * elf64-mips.c (bfd_elf64_mkobject): Likewise.
  1054. * elfn32-mips.c (bfd_elf32_mkobject): Likewise.
  1055. * elfxx-mips.h (_bfd_mips_elf_mkobject): Declare.
  1056. * elfxx-mips.c (is_mips_elf): New macro.
  1057. (_bfd_mips_elf_mkobject): New function.
  1058. (_bfd_mips_elf_final_link): Use is_mips_elf.
  1059. (_bfd_mips_elf_merge_private_bfd_data): Likewise.
  1060. 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
  1061. * elfxx-mips.c (mips_elf_record_relocs): Defer allocation of a
  1062. global GOT entry when deferring allocation of dynamic relocations.
  1063. (allocate_dynrelocs): When allocating deferred dynamic relocations,
  1064. also do the deferred allocation of a GOT entry.
  1065. 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
  1066. * elfxx-mips.c (mips_got_info): Add a "reloc_only_gotno" field.
  1067. (mips_elf_got_section): Delete.
  1068. (mips_elf_sort_hash_table): Use g->reloc_only_gotno to decide
  1069. how many reloc-only entries there are.
  1070. (mips_elf_count_got_symbols): Adjust g->reloc_only_gotno as
  1071. well as g->global_gotno.
  1072. (mips_elf_make_got_per_bfd): Initialize reloc_only_gotno.
  1073. (mips_elf_multi_got): Likewise. Use gg->reloc_only_gotno
  1074. rather than gg->assigned_gotno to store the number of
  1075. reloc-only GOT entries.
  1076. (mips_elf_create_got_section): Remove the MAYBE_EXCLUDE parameter.
  1077. Initialize reloc_only_gotno.
  1078. (mips_elf_calculate_relocation): Check htab->got_info instead of
  1079. dynobj when deciding whether to call mips_elf_adjust_gp,
  1080. (_bfd_mips_elf_create_dynamic_sections): Adjust the call
  1081. to mips_elf_create_got_section.
  1082. (mips_elf_record_relocs): Likewise. Remove redundant
  1083. "dynobj == NULL" code. Do not use mips_elf_create_got_section
  1084. or mips_elf_record_global_got_symbol for R_MIPS_32, R_MIPS_REL32
  1085. and R_MIPS_64; limit global_got_area to GGA_RELOC_ONLY instead.
  1086. (_bfd_mips_elf_finish_dynamic_symbol): Use htab->sgot instead
  1087. of mips_elf_got_section.
  1088. (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
  1089. (_bfd_mips_elf_finish_dynamic_sections): Likewise.
  1090. Move the initial assignment of G to the block that uses it;
  1091. it is used for an unrelated purpose later.
  1092. 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
  1093. * elfxx-mips.c (count_section_dynsyms): Move before the new first use.
  1094. (mips_elf_sort_hash_table): Take the output bfd as a parameter.
  1095. Remove the MAX_LOCAL parameter. Exit early if there are no
  1096. dynamic symbols, if there is no dynobj, or if there is no
  1097. GOT section. Use count_section_dynsyms instead of MAX_LOCAL.
  1098. Assert == rather than <= when checking hsd.max_unref_got_dynindx.
  1099. Also assert that g->global_gotno is right.
  1100. (mips_elf_count_forced_local_got_symbols): Rename to...
  1101. (mips_elf_count_got_symbols): ...and count global GOT entries too.
  1102. Set the global_got_area of a forced-local GGA_RELOC_ONLY symbol
  1103. to GGA_NONE.
  1104. (mips_elf_multi_got): Don't sort the symbol table.
  1105. (mips_elf_lay_out_got): Likewise. Use mips_elf_count_got_symbols
  1106. to count the number of global GOT entries.
  1107. (_bfd_mips_elf_final_link): Unconditionally call
  1108. mips_elf_sort_hash_table.
  1109. 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
  1110. * elfxx-mips.c (GGA_NORMAL, GGA_RELOC_ONLY, GGA_NONE): New macros.
  1111. (mips_elf_link_hash_entry): Add a "global_got_area" field.
  1112. (mips_elf_link_hash_newfunc): Initialize it.
  1113. (mips_elf_sort_hash_table_f): Use h->global_got_area instead of
  1114. h->root.got.offset. Do not handle forced_local symbols specially.
  1115. (mips_elf_record_global_got_symbol): Set h->global_got_area
  1116. instead of h->root.got.offset.
  1117. (mips_elf_recreate_got): Assert that h->global_got_area == GGA_NONE
  1118. for indirect and warning symbols.
  1119. (mips_elf_count_forced_local_got_symbols): Change the argument
  1120. from a "elf_link_hash_entry" to "mips_elf_link_hash_entry".
  1121. Use and set h->global_got_area instead of h->root.got.offset.
  1122. Set it to GGA_NONE for all forced-local symbols.
  1123. (mips_elf_set_global_got_offset): Set h->global_got_area
  1124. instead of h->root.got.offset. Use g->global_got_area instead
  1125. of a combination of dynindx, forced_local and tls_type.
  1126. (mips_elf_multi_got): Remove disabled code. Pass GGA_* values to
  1127. mips_elf_set_global_got_offset.
  1128. (mips_elf_lay_out_got): Use mips_elf_link_hash_traverse instead
  1129. of elf_link_hash_traverse.
  1130. (_bfd_mips_elf_copy_indirect_symbol): Copy the indirect symbol's
  1131. global_got_area to the direct symbol if the latter's value is higher.
  1132. Set the indirect symbol's area to GGA_NONE.
  1133. 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
  1134. * elf32-mips.c (elf_backend_hide_symbol): Delete.
  1135. * elfn32-mips.c (elf_backend_hide_symbol): Likewise.
  1136. * elf64-mips.c (elf_backend_hide_symbol): Likewise.
  1137. * elfxx-mips.h (elf_backend_hide_symbol): Likewise.
  1138. * elfxx-mips.c (mips_elf_link_hash_entry): Remove "forced_local"
  1139. and add "needs_lazy_stub".
  1140. (mips_elf_link_hash_newfunc): Update accordingly.
  1141. (mips_elf_link_hash_table): Remove "computed_got_sizes" and
  1142. add "lazy_stub_count".
  1143. (_bfd_mips_elf_link_hash_table_create): Update accordingly.
  1144. (mips_elf_output_extsym): Use hd->needs_lazy_stub to detect
  1145. cases where a lazy stub is being used.
  1146. (mips_elf_sort_hash_table_f): Use h->root.forced_local instead
  1147. of h->forced_local.
  1148. (mips_elf_record_global_got_symbol): Use _bfd_elf_link_hash_hide_symbol
  1149. instead of _bfd_mips_elf_hide_symbol. Do not increment local_gotno
  1150. here.
  1151. (mips_elf_allocate_dynamic_relocations): Move before new first use.
  1152. (mips_elf_check_recreate_got, mips_elf_recreate_got): New functions.
  1153. (mips_elf_resolve_final_got_entries): Move earlier in file. Make at
  1154. most two passes over the hash table. Use mips_elf_check_recreate_got
  1155. to see if there are any indirect or warning entries and
  1156. mips_elf_recreate_got to create a new GOT without them.
  1157. Return a boolean success value.
  1158. (mips_elf_count_forced_local_got_entries): New function.
  1159. (mips_elf_make_got_per_bfd): Check h->root.forced_local instead of
  1160. h->forced_local.
  1161. (mips_elf_set_global_got_offset): Likewise.
  1162. (mips_elf_set_no_stub): Replace with...
  1163. (mips_elf_forbid_lazy_stubs): ...this new function.
  1164. (mips_elf_resolve_final_got_entry): Delete.
  1165. (mips_elf_multi_got): Fix formatting. Use mips_elf_forbid_lazy_stubs
  1166. instead of mips_elf_set_no_stub. Move the code that sets
  1167. global offsets and allocates dynamic relocations from the main
  1168. _bfd_mips_elf_size_dynamic_sections loop to here.
  1169. (_bfd_mips_elf_adjust_dynamic_symbol): Do not allocate room in
  1170. .MIPS.stubs here; just set hmips->needs_lazy_stub and increment
  1171. htab->lazy_stub_count.
  1172. (_bfd_mips_elf_always_size_sections): Move the stub-estimation
  1173. code to mips_elf_estimate_stub_size and the GOT-sizing code to
  1174. mips_elf_lay_out_got. Do not call these functions here.
  1175. (mips_elf_estimate_stub_size): New function, split
  1176. out from _bfd_mips_elf_always_size_sections. Call
  1177. mips_elf_resolve_final_got_entries earlier. Count the number
  1178. of forced-local entries. Do not add stub sizes to loadable_size;
  1179. after this patch, the stub sizes are already included in the main
  1180. estimate. Allocate dynamic relocations here rather than in the
  1181. main _bfd_mips_elf_size_dynamic_sections loop.
  1182. (mips_elf_estimate_stub_size): New function, split out from
  1183. _bfd_mips_elf_always_size_sections.
  1184. (mips_elf_allocate_lazy_stub): New function.
  1185. (mips_elf_lay_out_lazy_stubs): Likewise.
  1186. (_bfd_mips_elf_size_dynamic_sections): Call mips_elf_estimate_stub_size,
  1187. mips_elf_lay_out_got and mips_elf_lay_out_lazy_stubs. Do not handle
  1188. the allocation of sreldyn specially.
  1189. (_bfd_mips_elf_hide_symbol): Delete.
  1190. 2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
  1191. * elfxx-mips.c (allocate_dynrelocs): Ignore indirect and warning
  1192. symbols.
  1193. 2008-08-06 Richard Sandiford <rdsandiford@googlemail.com>
  1194. * elfxx-mips.c (mips_elf_link_hash_entry): Move bfd_boolean
  1195. fields to the end of the structure and make them single-bit
  1196. bitfields.
  1197. (mips_elf_link_hash_newfunc): Make the initialization statements
  1198. follow the new field order.
  1199. 2008-08-06 Richard Sandiford <rdsandiford@googlemail.com>
  1200. * elfxx-mips.c (_mips_elf_section_data): Remove the "u.got_info" field.
  1201. (mips_elf_link_hash_table): Add "sgot" and "got_info" fields.
  1202. (_bfd_mips_elf_link_hash_table_create): Initialize them.
  1203. (mips_elf_got_section): Always apply the !maybe_excluded behavior.
  1204. (mips_elf_got_info): Delete.
  1205. (mips_elf_initialize_tls_slots): Remove the DYNOBJ local variable.
  1206. Adjust the call to mips_elf_got_section.
  1207. (mips_elf_local_got_index): Don't call mips_elf_got_info.
  1208. Update the call to mips_elf_create_local_got_entry.
  1209. Use htab->got_info.
  1210. (mips_elf_global_got_index): Don't call mips_elf_got_info;
  1211. use htab->got_info and htab->sgot instead.
  1212. (mips_elf_got_page): Don't call mips_elf_got_info. Update the
  1213. call to mips_elf_create_local_got_entry.
  1214. (mips_elf_got16_entry): Likewise.
  1215. (mips_elf_got_offset_from_index): Replace with DYNOBJ parameter
  1216. with an INFO parameter. Don't call mips_elf_got_info; use htab->sgot
  1217. and htab->got_info instead.
  1218. (mips_elf_create_local_got_entry): Remove the GG and SGOT parameters.
  1219. Use htab->sgot and htab->got_info.
  1220. (mips_elf_sort_hash_table): Remove the DYNOBJ local variable.
  1221. Don't call mips_elf_got_info; use htab->got_info instead.
  1222. (mips_elf_record_global_got_symbol): Turn G from a paramter to
  1223. a local variable and read it from htab->got_info.
  1224. (mips_elf_record_local_got_symbol): Replace the G parameter with
  1225. an INFO parameter. Make G a local variable and read it from
  1226. htab->got_info instead.
  1227. (mips_elf_record_got_page_entry): Likewise.
  1228. (mips_elf_multi_got): Remove the G parameter and make it a local
  1229. variable instead. Read it from htab->got_info.
  1230. (mips_elf_create_got_section): Cache the GOT section in htab->sgot.
  1231. Store the GOT information in htab->got_info.
  1232. (mips_elf_calculate_relocation): Don't call mips_elf_got_section
  1233. and mips_elf_got_info; use htab->sgot and htab->got_info instead.
  1234. Adjust the calls to mips_elf_got_offset_from_index and
  1235. mips_elf_adjust_gp.
  1236. (_bfd_mips_elf_check_relocs): Remove the G and SGOT local variables.
  1237. Adjust the calls to mips_elf_record_local_got_symbol,
  1238. mips_elf_record_global_got_symbol and mips_elf_record_got_page_entry.
  1239. Use htab->sgot.
  1240. (_bfd_mips_elf_always_size_sections): Remove the DYNOBJ local variable.
  1241. Don't call mips_elf_got_info; use htab->sgot and htab->got_info instead.
  1242. Update the call to mips_elf_multi_got.
  1243. (_bfd_mips_elf_size_dynamic_sections): Don't call mips_elf_got_info;
  1244. use htab->got_info instead.
  1245. (_bfd_mips_elf_finish_dynamic_symbol): Update the call to
  1246. mips_elf_got_section. Get the got_info from the hash table
  1247. rather than the GOT section.
  1248. (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
  1249. (_bfd_mips_elf_finish_dynamic_sections): Likewise.
  1250. (_bfd_mips_elf_hide_symbol): Don't call mips_elf_got_section;
  1251. get the got_info from the hash table instead. Remove the GOT
  1252. local variable.
  1253. (_bfd_mips_elf_final_link): Likewise. Also remove the DYNOBJ
  1254. local variable.
  1255. 2008-08-06 Richard Sandiford <rdsandiford@googlemail.com>
  1256. * elfxx-mips.c (mips_elf_link_hash_table): Add an "sstubs" field.
  1257. (_bfd_mips_elf_create_dynamic_sections): Use it to cache the stubs
  1258. section. Don't check whether the section already exists.
  1259. (_bfd_mips_elf_adjust_dynamic_symbol): Use htab->sstubs.
  1260. (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
  1261. (_bfd_mips_elf_finish_dynamic_sections): Likewise.
  1262. (_bfd_mips_elf_size_dynamic_sections): Likewise. Don't add the
  1263. dummy stub to an empty section.
  1264. (_bfd_mips_elf_link_hash_table_create): Initialize the "sstubs" field.
  1265. 2008-08-06 Richard Sandiford <rdsandiford@googlemail.com>
  1266. * reloc.c (BFD_RELOC_MIPS16_GOT16, BFD_RELOC_MIPS16_CALL16): Declare.
  1267. * libbfd.h, bfd-in2.h: Regenerate.
  1268. * elf32-mips.c (elf_mips16_howto_table_rel): Fill in reserved
  1269. R_MIPS16_GOT16 and R_MIPS16_CALL16 entries.
  1270. (mips16_reloc_map): Add mappings.
  1271. * elf64-mips.c (mips16_elf64_howto_table_rel): Fill in reserved
  1272. R_MIPS16_GOT16 and R_MIPS16_CALL16 entries.
  1273. (mips16_elf64_howto_table_rela): Likewise.
  1274. (mips16_reloc_map): Add mappings.
  1275. * elfn32-mips.c (elf_mips16_howto_table_rel): Fill in reserved
  1276. R_MIPS16_GOT16 and R_MIPS16_CALL16 entries.
  1277. (elf_mips16_howto_table_rela): Likewise.
  1278. (mips16_reloc_map): Add mappings.
  1279. * elfxx-mips.c (mips_elf_create_shadow_symbol): New function.
  1280. (section_allows_mips16_refs_p): Likewise.
  1281. (mips16_stub_symndx): Likewise.
  1282. (mips_elf_check_mips16_stubs): Treat the data argument as a
  1283. bfd_link_info. Mark every dynamic symbol as needing MIPS16 stubs
  1284. and create a "shadow" symbol for the original MIPS16 definition.
  1285. (mips16_reloc_p, got16_reloc_p, call16_reloc_p, hi16_reloc_p)
  1286. (lo16_reloc_p, mips16_call_reloc_p): New functions.
  1287. (_bfd_mips16_elf_reloc_unshuffle): Use mips16_reloc_p to generalize
  1288. relocation checks.
  1289. (_bfd_mips16_elf_reloc_shuffle): Likewise.
  1290. (_bfd_mips_elf_lo16_reloc): Handle R_MIPS16_GOT16.
  1291. (mips_elf_got16_entry): Add comment.
  1292. (mips_elf_calculate_relocation): Use hi16_reloc_p,
  1293. lo16_reloc_p, mips16_call_reloc_p, call16_reloc_p and got16_reloc_p
  1294. to generalize relocation checks. Use section_allows_mips16_refs_p
  1295. instead of mips16_stub_section_p. Handle R_MIPS16_CALL16 and
  1296. R_MIPS16_GOT16, allowing the former to refer directly to a
  1297. MIPS16 function if its stub is not needed.
  1298. (mips16_stub_section_p): Delete.
  1299. (_bfd_mips_elf_symbol_processing): Convert odd-valued function
  1300. symbols into even MIPS16 symbols.
  1301. (mips_elf_add_lo16_rel_addend): Use mips16_reloc_p to generalize
  1302. a relocation check.
  1303. (_bfd_mips_elf_check_relocs): Calculate "bed" and "rel_end"
  1304. earlier in the function. Use mips16_stub_symndx to identify
  1305. the target function. Avoid out-of-bounds accesses when the
  1306. stub has no relocations; report an error instead. Use
  1307. section_allows_mips16_refs_p instead of mips16_stub_section_p.
  1308. Use mips16_call_reloc_p and got16_reloc_p to generalize relocation
  1309. checks. Handle R_MIPS16_CALL16 and R_MIPS16_GOT16. Don't create
  1310. dynamic relocations for absolute references to __gnu_local_gp.
  1311. (_bfd_mips_elf_always_size_sections): Pass a bfd_link_info as
  1312. the argument to mips_elf_check_mips16_stubs. Generalize comment.
  1313. (_bfd_mips_elf_relocate_section): Use hi16_reloc_p and got16_reloc_p
  1314. to generalize relocation checks.
  1315. (_bfd_mips_elf_finish_dynamic_symbol): If a dynamic MIPS16 function
  1316. symbol has a non-MIPS16 stub, redirect the symbol to the stub.
  1317. Fix an overly long line. Don't give dynamic symbols type STO_MIPS16.
  1318. (_bfd_mips_elf_gc_sweep_hook): Handle R_MIPS16_CALL16 and
  1319. R_MIPS16_GOT16.
  1320. 2008-08-06 Alan Modra <amodra@bigpond.net.au>
  1321. * elf32-ppc.c (ppc_elf_relax_section): Clear R_PPC_PLTREL24 addend.
  1322. (ppc_elf_relocate_section <R_PPC_RELAX32_PLT>): Don't bother here.
  1323. 2008-08-05 Alan Modra <amodra@bigpond.net.au>
  1324. Jaka Močnik <jaka@xlab.si>
  1325. * coffcode.h (coff_slurp_line_table): bfd_alloc lineno_cache first
  1326. so that we don't inadvertently free it. Use bfd_alloc for sort
  1327. arrays, and memcpy sorted line table.
  1328. 2008-08-04 Alan Modra <amodra@bigpond.net.au>
  1329. * elf32-spu.c (spu_elf_auto_overlay): Use the maximum possible
  1330. if --fixed-space request is too large.
  1331. 2008-08-04 Alan Modra <amodra@bigpond.net.au>
  1332. * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Set LC_ALL=C.
  1333. * Makefile.in: Regenerate.
  1334. * po/SRC-POTFILES.in: Regenerate.
  1335. 2008-08-02 Alan Modra <amodra@bigpond.net.au>
  1336. * elf32-spu.c (mark_overlay_section): Move code calculating
  1337. max_overlay_size to correct block.
  1338. (spu_elf_auto_overlay): Don't use %x in einfo error message.
  1339. 2008-08-01 Alan Modra <amodra@bigpond.net.au>
  1340. Jan Kratochvil <jan.kratochvil@redhat.com>
  1341. * elfcore.h (elf_core_file_p): Ensure we have a backend match
  1342. with the correct arch size before rejecting the generic fallback.
  1343. * elfcode.h (elf_object_p): Likewise. Ensure arch size matches
  1344. before accepting a target.
  1345. 2008-08-01 Alan Modra <amodra@bigpond.net.au>
  1346. PR 6774
  1347. * elf.c (rewrite_elf_program_header): Don't wrap p_paddr to
  1348. include file or program headers.
  1349. 2008-07-30 Alan Modra <amodra@bigpond.net.au>
  1350. * coff-ppc.c, coffgen.c, ecoff.c, ecofflink.c, elf.c, elf32-frv.c,
  1351. elf32-iq2000.c, elf32-m32c.c, elf32-mep.c, elf32-mt.c,
  1352. elf32-sh-symbian.c, elf64-hppa.c, mach-o.c, peXXigen.c, pef.c,
  1353. ppcboot.c, vms-misc.c, xsym.c: Silence gcc warnings.
  1354. 2008-07-28 Daniel Jacobowitz <dan@codesourcery.com>
  1355. * elfxx-mips.c (mips_elf_calculate_relocation): Avoid generating
  1356. relocations for undefined weak symbols with non-default visibility.
  1357. (_bfd_mips_elf_check_relocs): Use possibly_dynamic_relocs for
  1358. global symbols in shared libraries.
  1359. (allocate_dynrelocs): New function.
  1360. (_bfd_mips_elf_adjust_dynamic_symbol): Do not handle
  1361. possibly_dynamic_relocs here.
  1362. (_bfd_mips_elf_size_dynamic_sections): Call allocate_dynrelocs.
  1363. 2008-07-28 Alexandre Oliva <aoliva@redhat.com>
  1364. * elf32-i386.c (struct elf_i386_link_hash_table): Added field
  1365. tls_module_base.
  1366. (elf_i386_link_hash_table_create): Initialize it.
  1367. (elf_i386_always_size_sections): Set it.
  1368. (set_tls_module_base): New.
  1369. (elf_i386_relocate_sections): Call it.
  1370. * elf64-x86-64.c (struct elf64_x86_64_link_hash_table): Added
  1371. field tls_module_base.
  1372. (elf64_x86_64_link_hash_table_create): Initialize it.
  1373. (elf64_x86_64_always_size_sections): Set it.
  1374. (set_tls_module_base): New.
  1375. (elf64_x86_64_relocate_sections): Call it.
  1376. Reported by Cary Coutant <ccoutant@google.com>
  1377. 2008-07-28 Ineiev <ineiev@yahoo.co.uk>
  1378. * elf32-arm.c (arm_map_one_stub): Declare variables at beginning
  1379. of block.
  1380. * elf32-avr.c (get_local_syms): Likewise.
  1381. 2008-07-28 Alan Modra <amodra@bigpond.net.au>
  1382. PR 6769
  1383. * bfd-in.h (BFD_VMA_FMT): Define.
  1384. (printf_vma, sprintf_vma): Use the above.
  1385. (_bfd_int64_low, _bfd_int64_high): Delete.
  1386. * bfd-in2.h: Regenerate.
  1387. 2008-07-27 Alan Modra <amodra@bigpond.net.au>
  1388. * elf.c (_bfd_elf_make_section_from_shdr): Ignore return from
  1389. elf_parse_notes. Use bfd_malloc_and_get_section.
  1390. (elf_parse_notes): Validate note namesz and descsz.
  1391. 2008-07-26 Michael Eager <eager@eagercon.com>
  1392. * elf32-ppc.c (ppc_elf_merge_obj_attributes): Check compatibility
  1393. between single-float, double-float, and soft-float.
  1394. 2008-07-24 Daniel Jacobowitz <dan@codesourcery.com>
  1395. * elf32-mips.c (elf_backend_write_section): Define.
  1396. 2008-07-24 Nick Clifton <nickc@redhat.com>
  1397. * elf.c (_bfd_elf_map_sections_to_segments): Catch off by one
  1398. error assigning sections to segments.
  1399. 2008-07-22 Nick Clifton <nickc@redhat.com>
  1400. * elf.c (_bfd_elf_map_sections_to_segments): Allow sections in
  1401. adjoining pages to be included in the same segment.
  1402. 2008-07-22 Simon Baldwin <simonb@google.com>
  1403. * elflink.c (elf_link_output_extsym): Set st_size to zero for
  1404. symbols from dynamic libraries.
  1405. 2008-07-21 H.J. Lu <hongjiu.lu@intel.com>
  1406. PR ld/4424
  1407. * elflink.c (_bfd_elf_merge_symbol): Call bed->relocs_compatible
  1408. to check if 2 inputs are compatible.
  1409. 2008-07-21 Sterling Augustine <sterling@tensilica.com>
  1410. * elf.c (assign_file_positions_for_load_sections): Print vma in
  1411. error message about overlapping section vmas.
  1412. 2008-07-21 H.J. Lu <hongjiu.lu@intel.com>
  1413. PR ld/6747
  1414. * elf32-frv.c (elf32_frv_relocate_section): Revert the change
  1415. for PR ld/6446 checked in by accident on May 21, 2008.
  1416. 2008-07-21 Nick Clifton <nickc@redhat.com>
  1417. * coff-sh.c (bfd_pe_print_pdata): Define to NULL for non
  1418. COFF_WITH_PE based SH ports.
  1419. * libpei.h (_bfd_XX_print_ce_compressed_pdata): Prototype.
  1420. * arm-wince-pe.c (bfd_pe_print_pdata): Use
  1421. _bfd_pe_print_ce_compressed_pdata.
  1422. (slurp_symcache, cleanup_syms, pe_print_ce_compressed_pdata): Move
  1423. to...
  1424. * peXXigen.c: ... here and rename pe_print_ce_compressed_pdata to
  1425. _bfd_XX_print_ce_compressed_pdata.
  1426. 2008-07-21 Alan Modra <amodra@bigpond.net.au>
  1427. * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Drop
  1428. unwanted zero terminators.
  1429. 2008-07-21 Alan Modra <amodra@bigpond.net.au>
  1430. * elf32-spu.c (spu_elf_relocate_section): Expand
  1431. RELOC_FOR_GLOBAL_SYMBOL. Don't warn about undefined symbols for
  1432. R_SPU_PPU32 and R_SPU_PPU64 relocations.
  1433. 2008-07-21 Luis Machado <luisgpm@br.ibm.com>
  1434. * elf-bfd.h: Declare elfcore_write_ppc_vsx.
  1435. * elf.c (elfcore_grok_ppc_vsx): New function.
  1436. (elfcore_write_ppc_vsx): New function
  1437. (elfcore_grok_note): Handle VSX notes.
  1438. (elfcore_write_register_note): Handle VSX notes.
  1439. 2008-07-18 Joseph Myers <joseph@codesourcery.com>
  1440. * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add new parameter.
  1441. * bfd-in2.h: Regenerate.
  1442. * elf32-arm.c (struct elf_arm_obj_tdata): Add field
  1443. no_wchar_size_warning.
  1444. (bfd_elf32_arm_set_target_relocs): Add new parameter
  1445. no_wchar_warn.
  1446. (elf32_arm_merge_eabi_attributes): Give a warning, not an error,
  1447. for conflicting wchar_t attributes. Do not warn if
  1448. --no-wchar-size-warning. Make diagnostic text more specific.
  1449. 2008-07-18 H.J. Lu <hongjiu.lu@intel.com>
  1450. PR ld/6748
  1451. * elf32-arm.c (elf32_arm_link_hash_table_create): Initialize
  1452. new fields added for ARM long call support.
  1453. 2008-07-18 Danny Backx <dannybackx@users.sourceforge.net>
  1454. * pe-arm-wince.c (pe_print_compressed_pdata): Define new function to
  1455. print compressed pdata structure as described on MSDN. This only
  1456. applies to a limited set of architectures (ARM, SH4).
  1457. (slurp_symtab, my_symbol_for_address): Define static helper
  1458. functions for pe_print_compressed_pdata.
  1459. * coffcode.h (bfd_coff_backend_data): Add _bfd_coff_print_pdata field.
  1460. (bfd_coff_have_print_pdata, bfd_coff_print_pdata): Define.
  1461. * bfd/peXXigen.c (_bfd_XX_print_private_bfd_data_common): Add check on
  1462. bfd_coff_backend_data, call the function if non-null.
  1463. * pei-mcore.c: Add target dependent initialisation for
  1464. bfd_coff_backend_data.
  1465. * coff-sh.c: Likewise.
  1466. * coff64-rs6000.c: Likewise.
  1467. * coff-rs6000.c: Likewise.
  1468. * libcoff-in.h: Likewise.
  1469. * cf-i386lynx.c: Likewise.
  1470. * coff-alpha.c: Likewise.
  1471. * coff-apollo.c: Likewise.
  1472. * coff-arm.c: Likewise.
  1473. * coff-aux.c: Likewise.
  1474. * coff-h8300.c: Likewise.
  1475. * coff-h8500.c: Likewise.
  1476. * coff-i386.c: Likewise.
  1477. * coff-i860.c: Likewise.
  1478. * coff-i960.c: Likewise.
  1479. * coff-ia64.c: Likewise.
  1480. * coff-m68k.c: Likewise.
  1481. * coff-m88k.c: Likewise.
  1482. * coff-maxq.c: Likewise.
  1483. * coff-mips.c: Likewise.
  1484. * coff-or32.c: Likewise.
  1485. * coff-sparc.c: Likewise.
  1486. * coff-tic30.c: Likewise.
  1487. * coff-tic4x.c: Likewise.
  1488. * coff-tic54x.c: Likewise.
  1489. * coff-tic80.c: Likewise.
  1490. * coff-w65.c: Likewise.
  1491. * coff-we32k.c: Likewise.
  1492. * coff-x86_64.c: Likewise.
  1493. * coff-z80.c: Likewise.
  1494. * coff-z8k.c: Likewise.
  1495. * pe-mcore.c: Likewise.
  1496. * pe-mips.c: Likewise.
  1497. * pe-ppc.c: Likewise.
  1498. * peXXigen.c: Likewise.
  1499. * pei-ppc.c: Likewise.
  1500. * libcoff.h: Regenerate.
  1501. 2008-07-16 Bernd Schmidt <bernd.schmidt@analog.com>
  1502. * elf32-bfin.c (bfin_check_relocs, bfin_relocate_section,
  1503. bfin_final_link_relocate, bfin_gc_mark_hook, bfin_gc_sweep_hook,
  1504. ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE,
  1505. struct _bfinfdpic_dynamic_got_info): Moved around to keep FD-PIC code
  1506. separate from non-FD-PIC.
  1507. 2008-07-14 DJ Delorie <dj@redhat.com>
  1508. * elf-m10300.c (mn10300_elf_final_link_relocate): Correct overflow
  1509. checks for PCREL8, PCREL16, GOTPC16, GOTOFF16, PLT16, and GOT16
  1510. relocs.
  1511. (mn10300_elf_relax_section): Correct jump offset check when target
  1512. is in a different section.
  1513. 2008-07-15 Jie Zhang <jie.zhang@analog.com>
  1514. * elf32-bfin.c (elf32_bfin_special_sections[]): New.
  1515. (elf_backend_special_sections): Define.
  1516. 2008-07-13 Craig Silverstein <csilvers@google.com>
  1517. PR binutils/6743
  1518. * dwarf2.c (struct dwarf2_debug): New variable info_ptr_memory.
  1519. (find_line): Use info_ptr_memory instead of sec_info_ptr.
  1520. (_bfd_dwarf2_cleanup_debug_info): Likewise.
  1521. 2008-07-12 Jie Zhang <jie.zhang@analog.com>
  1522. Revert
  1523. 2008-07-12 Jie Zhang <jie.zhang@analog.com>
  1524. * elf.c (_bfd_elf_map_sections_to_segments): Don't put
  1525. executable sections into the same segment with other
  1526. read only sections if --sep-code.
  1527. * elf32-bfin.c (elf32_bfin_code_in_l1): New variable.
  1528. (elf32_bfin_data_in_l1): New variable.
  1529. (elf32_bfin_final_write_processing): New.
  1530. (elf32_bfin_special_sections[]): New.
  1531. (elf_backend_final_write_processing): Define.
  1532. (elf_backend_special_sections): Define.
  1533. 2008-07-12 Jie Zhang <jie.zhang@analog.com>
  1534. * elf.c (_bfd_elf_map_sections_to_segments): Don't put
  1535. executable sections into the same segment with other
  1536. read only sections if --sep-code.
  1537. * elf32-bfin.c (elf32_bfin_code_in_l1): New variable.
  1538. (elf32_bfin_data_in_l1): New variable.
  1539. (elf32_bfin_final_write_processing): New.
  1540. (elf32_bfin_special_sections[]): New.
  1541. (elf_backend_final_write_processing): Define.
  1542. (elf_backend_special_sections): Define.
  1543. 2008-07-11 Andreas Schwab <schwab@suse.de>
  1544. * dwarf2.c (read_section): Take pointer to bfd_size_type instead
  1545. of unsigned long as last parameter.
  1546. (struct dwarf2_debug): Define dwarf_abbrev_size, dwarf_line_size,
  1547. dwarf_str_size and dwarf_ranges_size as bfd_size_type instead of
  1548. unsigned long.
  1549. 2008-07-10 Richard Sandiford <rdsandiford@googlemail.com>
  1550. * elfxx-mips.c (mips_elf_calculate_relocation): Calculate GP and GP0
  1551. for all relocation types. Allow any type of relocation to refer to
  1552. __gnu_local_gp.
  1553. 2008-07-10 Richard Sandiford <rdsandiford@googlemail.com>
  1554. * elfxx-mips.c (mips_elf_check_mips16_stubs): Use ELF_ST_IS_MIPS16.
  1555. (mips_elf_calculate_relocation): Likewise.
  1556. (_bfd_mips_elf_add_symbol_hook): Likewise.
  1557. (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
  1558. (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
  1559. 2008-07-10 Andreas Schwab <schwab@suse.de>
  1560. * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Add missing
  1561. paren.
  1562. 2008-07-09 Craig Silverstein <csilvers@google.com>
  1563. * Makefile.am (BFD32_LIBS): Add compress.lo.
  1564. (BFD32_LIBS_CFILES): Add compress.c.
  1565. (BFD_H_FILES): Likewise.
  1566. * Makefile.in: Regenerate.
  1567. * bfd-in2.h: Regenerate.
  1568. * config.in: Add HAVE_ZLIB_H
  1569. * configure.in: Add test for libz and zlib.h
  1570. * configure: Regenerate.
  1571. * dwarf2.c (read_section): New function.
  1572. (read_indirect_string): Call new function read_section.
  1573. (read_abbrevs): Likewise.
  1574. (decode_line_info): Likewise.
  1575. (read_debug_ranges): Likewise.
  1576. (find_line): Call new function read_section when just one
  1577. .zdebug_info section is found, otherwise read and compress
  1578. multiple sections.
  1579. (_bfd_dwarf2_cleanup_debug_info): Free sec_info_ptr.
  1580. * elf.c (_bfd_elf_make_section_from_shdr): Add zdebug prefix.
  1581. (special_sections_z): New struct.
  1582. (special_sections): Refer to special_sections_z.
  1583. * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Recognize
  1584. sections named .zdebug_*.
  1585. (_bfd_mips_elf_fake_sections): Likewise.
  1586. * compress.c: New file.
  1587. (bfd_uncompress_section_contents): New function.
  1588. 2008-07-07 Christophe Lyon <christophe.lyon@st.com>
  1589. * elf32-arm.c (arm_type_of_stub): Don't crash on local symbols in
  1590. the presence of a PLT.
  1591. 2008-07-07 Alan Modra <amodra@bigpond.net.au>
  1592. * bfd.c (bfd_demangle): Always trim off bfd_get_symbol_leading_char.
  1593. 2008-07-02 Alan Modra <amodra@bigpond.net.au>
  1594. * elf32-ppc.c (is_pic_glink_stub): New function.
  1595. (ppc_elf_get_synthetic_symtab): Don't generate symbols when
  1596. multiple shared/pie stubs per plt entry.
  1597. 2008-06-30 Richard Sandiford <rdsandiford@googlemail.com>
  1598. * elf.c (_bfd_elf_get_synthetic_symtab): Increment p by
  1599. bed->s->int_rels_per_ext_rel.
  1600. 2008-06-30 Richard Sandiford <rdsandiford@googlemail.com>
  1601. * syms.c (BSF_SYNTHETIC): New flag.
  1602. * elf.c (_bfd_elf_get_synthetic_symtab): Set it.
  1603. * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Likewise.
  1604. * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Likewise.
  1605. * bfd-in.h (bfd_asymbol_flavour): Return bfd_target_unknown_flavour
  1606. for synthetic symbols.
  1607. * bfd-in2.h: Regenerate.
  1608. 2008-06-30 Daniel Jacobowitz <dan@codesourcery.com>
  1609. * elf32-arm.c (record_arm_to_thumb_glue, record_thumb_to_arm_glue):
  1610. Expand comments.
  1611. (arm_map_one_stub): Use | 1 when setting the low bit.
  1612. 2008-06-29 Andreas Schwab <schwab@suse.de>
  1613. * elf32-m68k.c (elf_m68k_relocate_section): Don't ignore existing
  1614. addend on _GLOBAL_OFFSET_TABLE_.
  1615. 2008-06-24 Daniel Jacobowitz <dan@codesourcery.com>
  1616. * elf32-arm.c (STUB_ENTRY_NAME): Define.
  1617. (arm_thumb_thumb_long_branch_stub): Use bx instead of b.n.
  1618. (arm_pic_long_branch_stub): Mention R_ARM_REL32 instead of
  1619. R_ARM_ABS32.
  1620. (struct elf32_arm_stub_hash_entry): Add output_name.
  1621. (arm_build_one_stub): Move offsets into the offset argument
  1622. of _bfd_final_link_relocate. Correct offset for
  1623. arm_thumb_arm_v4t_stub_long_branch.
  1624. (elf32_arm_size_stubs): Set stub_entry->output_name.
  1625. (elf32_arm_ouput_plt_map_sym): Rename to elf32_arm_output_map_sym.
  1626. Update all callers.
  1627. (elf32_arm_output_stub_sym): New.
  1628. (arm_map_one_stub): Correct formatting. Use elf32_arm_output_stub_sym.
  1629. 2008-06-20 Alan Modra <amodra@bigpond.net.au>
  1630. * elf32-spu.c (needs_ovl_stub): Correctly return nonovl_stub for
  1631. non-branch insns.
  1632. 2008-06-20 Alan Modra <amodra@bigpond.net.au>
  1633. * elf32-spu.c (build_stub): Allow wraparound on stub branches.
  1634. (allocate_spuear_stubs, build_spuear_stubs): Return value from
  1635. count_stub/build_stub.
  1636. (spu_elf_build_stubs): Correct location of stub reloc error message.
  1637. 2008-06-18 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
  1638. * elf32-cr16.c (ELF_MACHINE_ALT1): Define to EM_CR16_OLD.
  1639. 2008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
  1640. * configure: Regenerate.
  1641. 2008-06-17 Alan Modra <amodra@bigpond.net.au>
  1642. * elf32-spu.c (struct spu_link_hash_table): Add extra_stack_space.
  1643. (spu_elf_check_vma): Add extra_stack_space param, copy to htab.
  1644. (spu_elf_auto_overlay): Use it.
  1645. (RECURSE_UNMARK): Define as 0.
  1646. (unmark_overlay_section): Heed RECURSE_UNMARK.
  1647. * elf32-spu.h (spu_elf_check_vma): Update prototype.
  1648. 2008-06-12 DJ Delorie <dj@redhat.com>
  1649. * elf32-m32c.c (ELF_MACHINE_ALT1): Define as EM_M32C_OLD.
  1650. 2008-06-09 Paul Brook <paul@codesourcery.com>
  1651. bfd/
  1652. * elf32-arm.c (elf32_arm_merge_private_bfd_data): Allow BE8 shared
  1653. libraries.
  1654. 2008-06-09 Christophe Lyon <christophe.lyon@st.com>
  1655. * elf32-arm.c (arm_stub_is_thumb): Define.
  1656. (elf32_arm_final_link_relocate): Handle near mode switching stubs.
  1657. 2008-06-07 Alan Modra <amodra@bigpond.net.au>
  1658. * elf32-spu.c (spu_elf_auto_overlay): Add valid area below sp
  1659. to stack calculation.
  1660. 2008-06-06 Paul Brook <paul@codesourcery.com>
  1661. bfd/
  1662. * elf32-arm.c (elf32_arm_merge_private_bfd_data): Reject BE8 input.
  1663. 2008-06-06 Alan Modra <amodra@bigpond.net.au>
  1664. * elf32-spu.c (spu_elf_auto_overlay): Relax requirement that
  1665. file names be unique. Specify archive:path in overlay script.
  1666. 2008-06-05 Alan Modra <amodra@bigpond.net.au>
  1667. PR ld/6590
  1668. * elf64-ppc.c (ppc_build_one_stub): Correct reloc offsets.
  1669. 2008-06-04 Alan Modra <amodra@bigpond.net.au>
  1670. * elf.c (ignore_section_sym): Don't test section sym value here.
  1671. (elf_map_symbols): Instead check zero value here as was done prior
  1672. to 2006-05-26 change.
  1673. 2008-06-04 Nick Clifton <nickc@redhat.com>
  1674. PR ld/6019
  1675. * elf32-avr.c (elf32_avr_relax_section): Handle the case where
  1676. there are no local symbols.
  1677. 2008-06-04 Alan Modra <amodra@bigpond.net.au>
  1678. * elf32-spu.c (get_sym_h): Don't attempt to read global syms.
  1679. (process_stubs): Likewise.
  1680. (discover_functions): Don't used cached symbols.
  1681. (maybe_insert_function): Correct condition under which function
  1682. array is realloc'd.
  1683. (mark_functions_via_relocs): Delete unused variable.
  1684. 2008-05-30 Frediano Ziglio <frediano.ziglio@vodafone.com>
  1685. Nick Clifton <nickc@redhat.com>
  1686. PR ld/6511
  1687. * elf64-hppa.c (allocate_global_data_opd): Default to using the
  1688. dynamic symbol table for local function names in shared libraries.
  1689. 2008-05-29 Jan Kratochvil <jan.kratochvil@redhat.com>
  1690. * elf.c (assign_file_positions_for_load_sections): Adjust pre-section
  1691. gaps based on VMA and P_VADDR instead of LMA and P_PADDR addresses.
  1692. 2008-05-28 Alan Modra <amodra@bigpond.net.au>
  1693. * elf32-spu.c (spu_elf_object_p): New function.
  1694. (elf_backend_object_p): Define.
  1695. (build_stub): Correct second word of 8 byte overlay stubs.
  1696. (spu_elf_relocate_section): Formatting.
  1697. 2008-05-24 Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
  1698. * elf.c (elfcore_write_register_note): New function.
  1699. * elf-bfd.h (elfcore_write_register_note): New prototype.
  1700. 2008-05-22 Christophe Lyon <christophe.lyon@st.com>
  1701. * elf32-arm.c (arm_type_of_stub): Ignore STT_SECTION symbols.
  1702. (elf32_arm_stub_add_mapping_symbol): Remove.
  1703. (elf32_arm_add_stub): Don't generate mapping symbols. Change
  1704. prototype.
  1705. (elf32_arm_size_stubs): Use new elf32_arm_add_stub
  1706. prototype. Don't generate thumb to arm glue for calls.
  1707. (arm_map_one_stub): Define.
  1708. (elf32_arm_output_arch_local_syms): Generate mapping symbols for
  1709. long calls stubs.
  1710. 2008-05-21 Nick Clifton <nickc@redhat.com>
  1711. * elf32-arm.c (group_sections): Reformat comments.
  1712. PR ld/6446
  1713. * elf32-frv.c (elf32_frv_relocate_section): Set EF_FRV_PIC by
  1714. default (for FDPIC). Clear it if any inter-segment relocations
  1715. are found.
  1716. * elf64-hppa.c (elf64_hppa_finalize_opd): Check NULL return
  1717. from elf_link_hash_lookup.
  1718. 2008-05-21 Maxim Kuvyrkov <maxim@codesourcery.com>
  1719. Add multi-GOT support for m68k.
  1720. * elf32-m68k.c (struct elf_m68k_link_hash_entry: got_entry_key,
  1721. glist): New fields.
  1722. (struct elf_m68k_got_entry_key, struct elf_m68k_got_entry,
  1723. struct elf_m68k_got, struct elf_m68k_bfd2got_entry,
  1724. struct elf_m68k_multi_got): New data structures.
  1725. (struct elf_m68k_link_hash_table: local_gp_p, use_neg_got_offsets_p,
  1726. allow_multigot_p, multi_got_): New fields.
  1727. (elf_m68k_multi_got): New macro.
  1728. (elf_m68k_link_hash_newfunc): Initialize new fields of
  1729. struct elf_m68k_link_hash_entry.
  1730. (elf_m68k_link_hash_table_create): Initialize new fields of
  1731. struct elf_m68k_link_hash_table.
  1732. (elf_m68k_link_hash_table_free): New static function implementing hook.
  1733. (elf_m68k_init_got, elf_m68k_clear_got, elf_m68k_create_empty_got): New
  1734. static functions for struct elf_m68k_got.
  1735. (elf_m68k_init_got_entry_key, elf_m68k_got_entry_hash,
  1736. elf_m68k_got_entry_eq): New static functions for
  1737. struct elf_m68k_got_entry.
  1738. (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT,
  1739. ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): New macros.
  1740. (enum elf_m68k_get_entry_howto): New enum.
  1741. (elf_m68k_get_got_entry, elf_m68k_update_got_entry_type,
  1742. elf_m68k_remove_got_entry_type): New static functions for
  1743. struct elf_m68k_got_entry.
  1744. (elf_m68k_add_entry_to_got): New static function.
  1745. (elf_m68k_bfd2got_entry_hash, elf_m68k_bfd2got_entry_eq,
  1746. elf_m68k_bfd2got_entry_del, elf_m68k_get_bfd2got_entry): New static
  1747. functions for struct elf_m68k_bfd2got_entry.
  1748. (struct elf_m68k_can_merge_gots_arg, elf_m68k_can_merge_gots_1,
  1749. elf_m68k_can_merge_gots): New traversal.
  1750. (struct elf_m68k_merge_gots_arg, elf_m68k_merge_gots_1,
  1751. elf_m68k_merge_gots): Ditto.
  1752. (struct elf_m68k_finalize_got_offsets_arg,
  1753. elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Ditto.
  1754. (struct elf_m68k_partition_multi_got_arg,
  1755. elf_m68k_partition_multi_got_1, elf_m68k_init_symndx2h_1,
  1756. elf_m68k_partition_multi_got): Ditto.
  1757. (elf_m68k_find_got_entry_ptr, elf_m68k_remove_got_entry): New static
  1758. functions.
  1759. (elf_m68k_copy_indirect_symbol): New static function implementing
  1760. a hook.
  1761. (elf_m68k_check_relocs): Update to add entries to multi-GOT.
  1762. (elf_m68k_gc_sweep_hook): Update to remove entries from multi-GOT.
  1763. (elf_m68k_always_size_sections): Assign BFDs to GOTs.
  1764. (elf_m68k_relocate_section): Update to properly handle GOT relocations.
  1765. (elf_m68k_finish_dynamic_symbol): Update to traverse all GOT entries
  1766. of a global symbol.
  1767. (bfd_elf_m68k_set_target_options): New function.
  1768. (bfd_elf32_bfd_link_hash_table_free): Define hook.
  1769. (bfd_elf32_bfd_final_link): Change expansion to bfd_elf_final_link
  1770. to skip generic calculation of GOT offsets.
  1771. (elf_backend_copy_indirect_symbol): Define hook.
  1772. * bfd-in.h (bfd_elf_m68k_set_target_options): Declare function.
  1773. * bfd-in2.h: Regenerate.
  1774. 2008-05-21 André Johansen <andrejoh@gmail.com>
  1775. PR 868
  1776. * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free memory allocated
  1777. for filenames in function tables and variable tables.
  1778. 2008-05-19 Alan Modra <amodra@bigpond.net.au>
  1779. PR 2995, PR 6473
  1780. * elf.c (_bfd_elf_make_section_from_shdr): Leave lma equal to
  1781. vma when all p_paddr fields are zero and there is more than
  1782. one PT_LOAD header.
  1783. 2008-05-15 Christophe Lyon <christophe.lyon@st.com>
  1784. Add long call support for ARM.
  1785. * elf32-arm.c (THM2_MAX_FWD_BRANCH_OFFSET): Define.
  1786. (THM2_MAX_BWD_BRANCH_OFFSET): Define.
  1787. (ARM_MAX_FWD_BRANCH_OFFSET): Define.
  1788. (ARM_MAX_BWD_BRANCH_OFFSET): Define.
  1789. (THM_MAX_FWD_BRANCH_OFFSET): Define.
  1790. (THM_MAX_BWD_BRANCH_OFFSET): Define.
  1791. (arm_long_branch_stub): Define.
  1792. (arm_pic_long_branch_stub): Define.
  1793. (arm_thumb_v4t_long_branch_stub): Define.
  1794. (arm_thumb_thumb_long_branch_stub): Define.
  1795. (arm_thumb_arm_v4t_long_branch_stub): Define.
  1796. (STUB_SUFFIX): Define.
  1797. (elf32_arm_stub_type): Define.
  1798. (elf32_arm_stub_hash_entry): Define.
  1799. (elf32_arm_link_hash_entry): Add stub_cache field.
  1800. (arm_stub_hash_lookup): Define.
  1801. (elf32_arm_link_hash_table): Add stub_hash_table, stub_bfd,
  1802. add_stub_section, layout_sections_again, stub_group, bfd_count,
  1803. top_index, input_list fields.
  1804. (elf32_arm_link_hash_newfunc): Init new field.
  1805. (stub_hash_newfunc): New function.
  1806. (elf32_arm_link_hash_table_create): Init stub_hash_table.
  1807. (elf32_arm_hash_table_free): New function.
  1808. (arm_type_of_stub): New function.
  1809. (elf32_arm_stub_name): New function.
  1810. (elf32_arm_get_stub_entry): New function.
  1811. (elf32_arm_stub_add_mapping_symbol): New function.
  1812. (elf32_arm_add_stub): New function.
  1813. (arm_build_one_stub): New function.
  1814. (arm_size_one_stub): New function.
  1815. (elf32_arm_setup_section_lists): New function.
  1816. (elf32_arm_next_input_section): New function.
  1817. (group_sections): New function.
  1818. (elf32_arm_size_stubs): New function.
  1819. (elf32_arm_build_stubs): New function.
  1820. (bfd_elf32_arm_add_glue_sections_to_bfd): Skip stub sections.
  1821. (bfd_elf32_arm_process_before_allocation): No longer handle
  1822. R_ARM_CALL and R_ARM_THM_CALL.
  1823. (using_thumb_only): New function.
  1824. (elf32_arm_final_link_relocate): Redirect calls to stub if range
  1825. exceeds encoding capabilities.
  1826. (bfd_elf32_bfd_link_hash_table_free): Define.
  1827. * bfd-in.h (R_ARM_max): Fix value to 130.
  1828. (elf32_arm_setup_section_lists): Protype.
  1829. (elf32_arm_next_input_section): Protype.
  1830. (elf32_arm_size_stubs): Protype.
  1831. (elf32_arm_build_stubs): Protype.
  1832. * bfd-in2.h: Regenerate.
  1833. 2008-05-14 Ulrich Weigand <uweigand@de.ibm.com>
  1834. * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Fix memset calls.
  1835. * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Likewise.
  1836. 2008-05-14 Alan Modra <amodra@bigpond.net.au>
  1837. * Makefile.am: Run "make dep-am".
  1838. * Makefile.in: Regenerate.
  1839. 2008-05-14 Ulrich Weigand <uweigand@de.ibm.com>
  1840. Alan Modra <amodra@bigpond.net.au>
  1841. * elf32-ppc.c (section_covers_vma): New function.
  1842. (ppc_elf_get_synthetic_symtab): New function.
  1843. (bfd_elf32_get_synthetic_symtab): Define.
  1844. * elf64-ppc.c (section_covers_vma): New function.
  1845. (ppc64_elf_get_synthetic_symtab): Generate sym@plt on glink branch
  1846. table entries, and __glink_PLTresolve on resolver stub.
  1847. (ppc64_elf_build_stubs): Rename __glink sym to __glink_PLTresolve.
  1848. 2008-05-12 Alan Modra <amodra@bigpond.net.au>
  1849. PR 6443
  1850. * elf32-ppc.c (MUST_BE_DYN_RELOC): Delete.
  1851. (must_be_dyn_reloc): New function.
  1852. (ppc_elf_check_relocs): Don't set DF_STATIC_TLS for tprel relocs
  1853. in pies.
  1854. (ppc_elf_tls_optimize): Optimise pies.
  1855. (ppc_elf_relocate_section): Use a section symbol rather than no
  1856. symbol if possible for LD->IE TLS sequence, but don't error if
  1857. we must use no symbol.
  1858. * elf64-ppc.c (MUST_BE_DYN_RELOC): As for elf32-ppc.c.
  1859. (must_be_dyn_reloc): Likewise.
  1860. (ppc64_elf_check_relocs): Likewise.
  1861. (ppc64_elf_tls_optimize): Likewise.
  1862. (ppc64_elf_relocate_section): Likewise.
  1863. 2008-05-12 Alan Modra <amodra@bigpond.net.au>
  1864. * elf32-spu.c (spu_elf_relocate_section): Rename is_ea to is_ea_sym.
  1865. 2008-05-10 Paul Pluzhnikov <ppluzhnikov@google.com>
  1866. * elfcore.h (elf_core_file_p): Warn about core truncation.
  1867. 2008-05-07 Bob Wilson <bob.wilson@acm.org>
  1868. * elf32-xtensa.c (xtensa_property_section_name): New.
  1869. (xtensa_make_property_section): New.
  1870. (xtensa_get_property_section): Make static. Do not create a new
  1871. section if it does not exist.
  1872. 2008-05-08 Alan Modra <amodra@bigpond.net.au>
  1873. * elf32-spu.c (spu_elf_special_sections): Add "._ea".
  1874. (spu_elf_relocate_section): Handle relocations against symbols
  1875. defined in ._ea specially.
  1876. 2008-05-03 Daniel Jacobowitz <dan@codesourcery.com>
  1877. * elf32-arm.c (elf32_arm_symbian_link_hash_table_create): Use
  1878. ARRAY_SIZE.
  1879. (elf32_arm_symbian_plt_sym_val): New.
  1880. (elf_backend_plt_sym_val): Define.
  1881. 2008-05-03 Alan Modra <amodra@bigpond.net.au>
  1882. PR 2995, PR 6473
  1883. * elf.c (rewrite_elf_program_header): Rather than clearing
  1884. p_paddr_valid at end, don't set it in the first place. Delete
  1885. comment no longer relevant. When not p_paddr_valid, don't set
  1886. paddr from vaddr, and don't set p_vaddr_offset.
  1887. 2008-05-01 Cary Coutant <ccoutant@google.com>
  1888. * elf.c (bfd_elf_get_str_section): Fix memory leak caused by
  1889. corrupt string table.
  1890. 2008-05-01 Joel Brobecker <brobecker@adacore.com>
  1891. * cache.c (cache_bread_1): Renames cache_bread.
  1892. (cache_bread): New function.
  1893. 2008-05-01 Alan Modra <amodra@bigpond.net.au>
  1894. PR 2995, PR 6473
  1895. * elf.c (_bfd_elf_make_section_from_shdr): Always set lma from p_paddr.
  1896. (assign_file_positions_for_load_sections): Combine nested "if".
  1897. (copy_elf_program_header): Don't set p_paddr_valid or p_vaddr_offset
  1898. when all header p_paddr fields are zero.
  1899. 2008-04-30 Edmar Wienskoski <edmar@freescale.com>
  1900. * cpu-powerpc.c (bfd_powerpc_archs): Add e500mc entry.
  1901. 2008-04-29 Daniel Jacobowitz <dan@codesourcery.com>
  1902. * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound)
  1903. (_bfd_elf_canonicalize_dynamic_reloc): Find dynamic relocations
  1904. even if they are not loaded.
  1905. * elflink.c (_bfd_elf_init_2_index_sections): Set data_index_section
  1906. first.
  1907. 2008-04-25 Jay Foad <jay.foad@gmail.com>
  1908. * reloc16.c (bfd_coff_reloc16_get_value): Add support for
  1909. undefined weak symbols.
  1910. 2008-04-25 Nick Clifton <nickc@redhat.com>
  1911. * po/vi.po: Updated Vietnamese translation.
  1912. 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
  1913. * aclocal.m4: Regenerate.
  1914. * configure: Regenerate.
  1915. 2008-04-21 Cary Coutant <ccoutant@google.com>
  1916. * archive.c (_bfd_write_archive_contents): Fix incorrect use of
  1917. ARFMAG.
  1918. 2008-04-21 Nathan Sidwell <nathan@codesourcery.com>
  1919. * elfxx-mips.c (_bfd_mips_vxworks_adjust_dynamic_symbol): Don't
  1920. set the value of undefined symbols in shared objects.
  1921. (_bfd_mips_vxworks_finish_dynamic_symbol): Clear value for
  1922. undefined symbols unless pointer equality is needed.
  1923. 2008-04-18 Dennis Roberts <dennis.roberts@sunquestinfo.com>
  1924. * aix5ppc-core.c: Define macros for the default architecture and
  1925. machine for matching core files.
  1926. (xcoff64_core_p): Set the architecture and machine to the default
  1927. values defined in the macros mentioned above.
  1928. * rs6000-core.c: Define macros to determine whether or not the
  1929. core file header uses the core_dumpxx header format.
  1930. (rs6000coff_core_p): Don't match core files that use the
  1931. core_dumpxx header format.
  1932. 2008-04-16 Pedro Alves <pedro@codesourcery.com>
  1933. * config.bfd (i[3-7]86-*-dicos*, x86_64-*-dicos*): Add.
  1934. 2008-04-16 David S. Miller <davem@davemloft.net>
  1935. * reloc.c (BFD_RELOC_SPARC_GOTDATA_HIX22,
  1936. BFD_RELOC_SPARC_GOTDATA_LOX10, BFD_RELOC_SPARC_GOTDATA_OP_HIX22,
  1937. BFD_RELOC_SPARC_GOTDATA_OP_LOX10, BFD_RELOC_SPARC_GOTDATA_OP): New.
  1938. * libbfd.h: Regnerate.
  1939. * bfd-in2.h: Regenerate.
  1940. * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Add entries for
  1941. GOTDATA relocations.
  1942. (sparc_reloc_map): Likewise.
  1943. (_bfd_sparc_elf_check_relocs): Handle R_SPARC_GOTDATA_* like
  1944. R_SPARC_GOT*.
  1945. (_bfd_sparc_elf_gc_sweep_hook): Likewise.
  1946. (_bfd_sparc_elf_relocate_section): Transform R_SPARC_GOTDATA_HIX22,
  1947. R_SPARC_GOTDATA_LOX10, R_SPARC_GOTDATA_OP_HIX22, and
  1948. R_SPARC_GOTDATA_OP_LOX10 into the equivalent R_SPARC_GOT* reloc.
  1949. Simply ignore R_SPARC_GOTDATA_OP relocations.
  1950. 2008-04-14 Aurelien Jarno <aurelien@aurel32.net>
  1951. * configure.in: Link with the PIC version of libiberty on
  1952. Linux/MIPS hosts.
  1953. * configure: Regenerate.
  1954. 2008-04-14 Edmar Wienskoski <edmar@freescale.com>
  1955. * archures.c: Add bfd_mach_ppc_e500mc.
  1956. * bfd-in2.h: Regenerate.
  1957. 2008-04-08 Alan Modra <amodra@bigpond.net.au>
  1958. * elf32-spu.c (spu_elf_build_stubs): Correct error message.
  1959. (mark_functions_via_relocs): Remove premature init of symtab_hdr.
  1960. (collect_overlays): Commment typo fix.
  1961. 2008-04-08 Kees Cook <kees@canonical.com>
  1962. * elflink.c (bfd_elf_size_dynamic_sections): Ignore GNU-stack note
  1963. in EXEC_P bfds.
  1964. 2008-04-08 Alan Modra <amodra@bigpond.net.au>
  1965. * elf32-spu.c: Include libiberty.h.
  1966. (struct spu_link_hash_table): Add local_stire, overlay_fixed, reserved,
  1967. non_ovly_stub, spu_elf_load_ovl_mgr, spu_elf_open_overlay_script,
  1968. spu_elf_relink, auto_overlay fields.
  1969. (AUTO_OVERLAY, AUTO_RELINK, OVERLAY_RODATA): Define.
  1970. (needs_ovl_stub): Flip test so that call to non-function warning
  1971. is emitted during relocate_section rather than earlier.
  1972. (spu_elf_check_vma): Stash --auto-overlay parameters, and clear
  1973. auto_overlay if no section exceeds local store.
  1974. (struct call_info): Add count, max_depth, is_pasted fields.
  1975. (struct function_info): Add rodata, last_caller, call_count,
  1976. depth, new visit flags.
  1977. (insert_callee): Increment call count.
  1978. (copy_callee): New function.
  1979. (mark_functions_via_relocs): Investigate all reloc types to count
  1980. possible function pointer stubs for --auto-overlay. Track
  1981. last_caller and increment function call_count.
  1982. (pasted_function): Insert a "call" into call info for pasted section.
  1983. (remove_cycles): Track max depth of calls. Don't emit call graph
  1984. pruning warning for --auto-overlay.
  1985. (build_call_tree): Don't transfer_calls for --auto-overlay.
  1986. Adjust remove_cycles call.
  1987. (sort_calls, sort_lib, sort_bfds): New functions.
  1988. (struct _mos_param, struct _uos_param, struct _cl_param): New.
  1989. (mark_overlay_section, unmark_overlay_section): New functions.
  1990. (collect_lib_sectios, auto_ovl_lib_functions): New functions.
  1991. (collect_overlays, find_pasted_call): New functions.
  1992. (sum_stack): Deal with is_pasted "calls". Exit before printing
  1993. when --auto-overlay.
  1994. (spu_elf_auto_overlay): New function.
  1995. (spu_elf_final_link): Call spu_elf_auto_overlay.
  1996. * elf32-spu.h (spu_elf_check_vma): Update prototype.
  1997. 2008-04-07 Alan Modra <amodra@bigpond.net.au>
  1998. * elf32-spu.c (allocate_spuear_stubs): Ensure _SPUEAR_ symbol
  1999. is defined in overlay section before creating a stub.
  2000. (build_spuear_stubs): Likewise.
  2001. (spu_elf_size_stubs, spu_elf_build_stubs): Adjust calls.
  2002. 2008-04-02 Alan Modra <amodra@bigpond.net.au>
  2003. * elf32-spu.c (insert_callee): Reorder call list so most recent
  2004. call is always first.
  2005. (interesting_section): Move.
  2006. (mark_functions_via_relocs): Fold interesting_section and
  2007. reloc_count tests in callers to here. Simplify output section
  2008. owner test.
  2009. (discover_functions): Set "gaps" when no symbols and some
  2010. "interesting_section". Run pasted_function loop for no symbol
  2011. bfds.
  2012. (for_each_node, transfer_calls): New functions.
  2013. (mark_non_root): Adjust to suit for_each_node.
  2014. (call_graph_traverse): Likewise. Fix memory leak. Rename to..
  2015. (remove_cycles): ..this.
  2016. (build_call_tree): Use for_each_node and transfer_calls.
  2017. (struct _sum_stack_param): New.
  2018. (sum_stack): Adjust to suit for_each_node. Return error on
  2019. malloc failure. Move code to print root node cumulative stack from..
  2020. (spu_elf_stack_analysis): ..here. Use for_each_node.
  2021. 2008-03-31 Cary Coutant <ccoutant@google.com>
  2022. PR 6006
  2023. * archive.c (_bfd_slurp_extended_name_table): Change
  2024. ARFMAG[0] to ARFMAG[1].
  2025. (_bfd_construct_extended_name_table): Likewise.
  2026. 2008-03-31 Daniel Jacobowitz <dan@codesourcery.com>
  2027. * elfxx-mips.c (mips_elf_record_got_page_entry): Update comment.
  2028. (_bfd_mips_elf_check_relocs): Update comments. Always call
  2029. mips_elf_record_got_page_entry for R_MIPS_GOT_PAGE.
  2030. 2008-03-27 Cary Coutant <ccoutant@google.com>
  2031. Add support for thin archives.
  2032. * archive.c (_bfd_find_nested_archive): New function.
  2033. (get_extended_arelt_filename): Add origin parameter.
  2034. (_bfd_generic_read_ar_hdr_mag): Deal with extended name
  2035. combined with a file offset.
  2036. (append_relative_path): New function.
  2037. (_bfd_get_elt_at_filepos): Deal with external members and
  2038. nested archives.
  2039. (bfd_generic_openr_next_archived_file): Thin archives.
  2040. (bfd_generic_archive_p): Recognize new magic string.
  2041. (adjust_relative_path): New function.
  2042. (_bfd_construct_extended_name_table): Construct extended
  2043. names for thin archive members.
  2044. (_bfd_write_archive_contents): Emit new magic string, skip
  2045. copying files for thin archives.
  2046. * bfd-in.h (bfd_is_thin_archive): New macro.
  2047. * bfd.c (struct bfd): New fields for thin archives.
  2048. * libbfd-in.h (struct areltdata): New field for thin archives.
  2049. * opncls.c (bfd_close): Delete BFDs for nested archives.
  2050. 2008-03-25 Bernd Schmidt <bernd.schmidt@analog.com>
  2051. * elf32-bfin.c (bfin_final_link_relocate): New function, wrapper around
  2052. _bfd_final_link_relocate that also handles R_pcrel24 relocs.
  2053. (bfinfdpic_relocate_section, bfin_relocate_section): Use it.
  2054. 2008-03-25 Nathan Sidwell <nathan@codesourcery.com>
  2055. * elf32-arm.c (elf32_arm_final_link_relocate): Skip dynamic relocs
  2056. in vxworks tls_vars sections.
  2057. (allocate_dynrelocs, elf32_arm_size_dynamic_sections): Likewise.
  2058. * elf32-i386.c (allocate_dynrelocs,
  2059. elf_i386_size_dynamic_sections, elf_i386_relocate_section): Likewise.
  2060. * elf32-ppc.c (allocate_dynrelocs, ppc_elf_size_dynamic_sections,
  2061. ppc_elf_relocate_section): Likewise.
  2062. * elf32-sh.c (allocate_dynrelocs, sh_elf_size_dynamic_sections,
  2063. sh_elf_relocate_section): Likewise.
  2064. * elfxx-sparc.c (allocate_dynrelocs,
  2065. _bfd_sparc_elf_size_dynamic_sections,
  2066. _bfd_sparc_elf_relocate_section): Likewise.
  2067. 2008-03-21 Adam Nemet <anemet@caviumnetworks.com>
  2068. * elf.c (_bfd_elf_print_private_bfd_data): Use bfd_fprintf_vma to
  2069. print the values from the dynamic section.
  2070. 2008-03-20 Richard Sandiford <rsandifo@nildram.co.uk>
  2071. * elfxx-mips.c (MIPS_ELF_GNU_GOT1_MASK): New macro.
  2072. (_bfd_mips_elf_finish_dynamic_sections): Use it instead of 0x80000000.
  2073. 2008-03-20 Alan Modra <amodra@bigpond.net.au>
  2074. * elf32-spu.c (spu_elf_create_sections): Remove output_bfd parameter.
  2075. (spu_elf_find_overlays, spu_elf_size_stubs): Likewise
  2076. (process_stubs, discover_functions, build_call_tree): Likewise.
  2077. (spu_elf_stack_analysis): Likewise.
  2078. (spu_elf_check_vma): Likewise. Move.
  2079. (struct call_info): Make "is_tail" a bitfield.
  2080. (insert_callee): Clear fun->start and set fun->is_func if we find
  2081. a non-tail call.
  2082. * elf32-spu.h (spu_elf_create_sections): Update prototype.
  2083. (spu_elf_find_overlays, spu_elf_size_stubs, spu_elf_check_vma): Ditto.
  2084. 2008-03-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
  2085. * aclocal.m4: Regenerate.
  2086. * configure: Likewise.
  2087. * Makefile.in: Likewise.
  2088. 2008-03-16 H.J. Lu <hongjiu.lu@intel.com>
  2089. PR ld/5789
  2090. PR ld/5943
  2091. * elf32-i386.c (elf_i386_relocate_section): Issue an error
  2092. for R_386_GOTOFF relocaton against undefined hidden/internal
  2093. symbols when building a shared object.
  2094. * elf64-x86-64.c (elf64_x86_64_relocate_section): Issue an
  2095. error for R_X86_64_PC8/R_X86_64_PC16/R_X86_64_PC32
  2096. relocaton against undefined hidden/internal symbols when
  2097. building a shared object.
  2098. (elf64_x86_64_finish_dynamic_symbol): Return FALSE when symbol
  2099. is referenced locally, but isn't defined in a regular file.
  2100. 2008-03-15 H.J. Lu <hongjiu.lu@intel.com>
  2101. * bfd-in.h (BFD_NO_FLAGS, HAS_RELOC, EXEC_P, HAS_LINENO,
  2102. HAS_DEBUG, HAS_SYMS, HAS_LOCALS, DYNAMIC, WP_TEXT, D_PAGED,
  2103. BFD_IS_RELAXABLE, BFD_TRADITIONAL_FORMAT, BFD_IN_MEMORY,
  2104. HAS_LOAD_PAGE, BFD_LINKER_CREATED): Moved to ...
  2105. * bfd.c: Here.
  2106. * bfd.c (bfd): Change cacheable, target_defaulted, opened_once,
  2107. mtime_set, no_export, output_has_begun and has_armap to bit
  2108. field.
  2109. * bfd-in2.h: Regenerated.
  2110. 2008-03-14 Daniel Jacobowitz <dan@codesourcery.com>
  2111. * cache.c (close_one): Remove mtime hack.
  2112. 2008-03-14 H.J. Lu <hongjiu.lu@intel.com>
  2113. PR ld/5913
  2114. * elfxx-ia64.c (elfNN_ia64_tprel_base): Remove BFD_ASSERT.
  2115. (elfNN_ia64_dtprel_base): Likewise.
  2116. (elfNN_ia64_relocate_section): Go to missing_tls_sec if
  2117. tls_sec is NULL before calling elfNN_ia64_tprel_base or
  2118. elfNN_ia64_dtprel_base. Report unsupported TLS relocations.
  2119. 2008-03-14 Alan Modra <amodra@bigpond.net.au>
  2120. * elf32-spu.c (process_stubs, spu_elf_relocate_section): Move
  2121. common code to..
  2122. (maybe_needs_stub): ..here, a new function that also omits stubs
  2123. for .eh_frame, and..
  2124. (needs_ovl_stub): ..here. Create stubs for labels in code section
  2125. referenced by switch jump table.
  2126. (spu_elf_find_overlays): Set htab->ovly_load and htab->ovly_return.
  2127. (enum _insn_type): Delete.
  2128. (enum _stub_type): New.
  2129. (count_stub, build_stub): Adjust.
  2130. (allocate_spuear_stubs, build_spuear_stubs): Adjust.
  2131. 2008-03-13 Alan Modra <amodra@bigpond.net.au>
  2132. * elf.c (_bfd_elf_make_section_from_shdr): Remove unnecessary cast.
  2133. (_bfd_elf_assign_file_position_for_section): Simplify align.
  2134. (_bfd_elf_init_reloc_shdr): Ensure shift expression wide enough
  2135. for sh_addralign.
  2136. (elf_fake_sections, swap_out_syms): Likewise.
  2137. * elflink.c (bfd_elf_final_link): Likewise.
  2138. 2008-03-13 Alan Modra <amodra@bigpond.net.au>
  2139. * Makefile.am: Run "make dep-am".
  2140. * Makefile.in: Regenerate.
  2141. * po/SRC-POTFILES.in: Regenerate.
  2142. 2008-03-12 Bernd Schmidt <bernd.schmidt@analog.com>
  2143. From Jie Zhang <jie.zhang@analog.com>
  2144. * elf32-bfin.c (struct bfinfdpic_relocs_info): Make got17m4,
  2145. gothilo, fd, fdgot17m4, fdgothilo, fdgoff17m4, fdgoffhilo,
  2146. gotoff, call and sym not bitfields.
  2147. (bfinfdpic_gc_sweep_hook): New function; update the relocation
  2148. information for the relocations of the section being removed.
  2149. (bfinfdpic_check_relocs): Accumulate the number of relocations
  2150. which set got17m4, gothilo, fd, fdgot17m4, fdgothilo, fdgoff17m4,
  2151. fdgoffhilo, gotoff, call and sym fields.
  2152. (elf_backend_gc_sweep_hook): Redefine for FD-PIC.
  2153. 2008-03-12 Alan Modra <amodra@bigpond.net.au>
  2154. PR 5900
  2155. * elf-bfd.h: Include elf/internal.h after elf/external.h.
  2156. * elfcode.h (elf_swap_symbol_in): Map reserved shndx range.
  2157. (elf_swap_symbol_out): Adjust SHN_XINDEX test.
  2158. (elf_swap_ehdr_out): Mask SHN_LORESERVE and SHN_XINDEX to values
  2159. seen in external structs.
  2160. (valid_section_index_p): Delete.
  2161. (elf_object_p): Don't increment section numbers over reserved range.
  2162. Simplify test for valid sh_link, sh_info and e_shstrndx fields.
  2163. (elf_write_shdrs_and_ehdr): Mask SHN_LORESERVE and SHN_XINDEX to values
  2164. seen in external structs. Don't increment section numbers over
  2165. reserved range.
  2166. * elf.c (bfd_elf_sym_name): Remove redundant tests on st_shndx.
  2167. (bfd_section_from_shdr): Likewise.
  2168. (group_signature): Range check before accessing elf_elfsections.
  2169. (_bfd_elf_setup_sections): Likewise.
  2170. (bfd_section_from_shdr): Likewise.
  2171. (bfd_section_from_shdr): Don't increment section number over
  2172. reserved sections.
  2173. (assign_file_positions_for_non_load_sections): Likewise.
  2174. (assign_file_positions_except_relocs): Likewise.
  2175. (_bfd_elf_write_object_contents): Likewise.
  2176. (assign_section_numbers): Likewise. Adjust for changed SHN_*.
  2177. (prep_headers): Delete unused variable.
  2178. * elflink.c (bfd_elf_link_record_local_dynamic_symbol): Adjust
  2179. for changed SHN_* values.
  2180. (check_dynsym, elf_link_input_bfd): Likewise.
  2181. (bfd_elf_final_link): Likewise. Don't skip over reserved section
  2182. range.
  2183. (elf_fixup_link_order): Check that sh_link field is valid.
  2184. * elf-hppa.h (elf_hppa_add_symbol_hook): Make "index" unsigned.
  2185. * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Range check before
  2186. accesssing elf_elfsections.
  2187. * elf32-avr.c (elf32_avr_size_stubs): Likewise.
  2188. * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
  2189. * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Likewise.
  2190. * elf64-hppa.c (elf64_hppa_check_relocs): Adjust for changed
  2191. SHN_* defines. Test for SHN_BAD return from
  2192. _bfd_elf_section_from_bfd_section
  2193. 2008-03-12 Alan Modra <amodra@bigpond.net.au>
  2194. * elf-bfd.h (_bfd_elf_section_from_bfd_section): Update prototype.
  2195. * elf.c (_bfd_elf_section_from_bfd_section): Return unsigned int,
  2196. SHN_BAD on error.
  2197. (_bfd_elf_print_private_bfd_data): Test for SHN_BAD result from
  2198. _bfd_elf_section_from_bfd_section, not -1.
  2199. (swap_out_syms): Likewise.
  2200. * elflink.c (elf_link_add_object_symbols): Likewise.
  2201. (bfd_elf_get_bfd_needed_list): Likewise.
  2202. (bfd_elf_match_symbols_in_sections): Likewise.
  2203. (elf_link_add_object_symbols): Don't bother testing for symbols
  2204. using normal sections before calling bfd_section_from_elf_index.
  2205. (elf_link_input_bfd, bfd_elf_final_link): Likewise.
  2206. (bfd_elf_reloc_symbol_deleted_p): Likewise.
  2207. * elfcode.h (elf_slurp_symbol_table): Likewise.
  2208. * elf32-spu.c (get_sym_h): Likewise.
  2209. * elf32-xtensa.c (get_elf_r_symndx_section): Likewise.
  2210. * elf64-ppc.c (opd_entry_value, get_sym_h, ppc64_elf_edit_toc): Ditto.
  2211. * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
  2212. 2008-03-11 Alan Modra <amodra@bigpond.net.au>
  2213. * elf32-spu.c (spu_elf_relocate_section): Test identical conditions
  2214. to those in process_stubs for overlay symbols.
  2215. 2008-03-09 Paul Brook <paul@codesourcery.com>
  2216. * elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle new
  2217. Tag_VFP_arch values.
  2218. 2008-03-08 Paul Brook <paul@codesourcery.com>
  2219. * elf32-arm.c (insert_thumb_branch): Rewrite.
  2220. (elf32_thumb_to_arm_stub): Use new insert_thumb_branch.
  2221. 2008-03-07 Paul Brook <paul@codesourcery.com>
  2222. * elf32-arm.c (elf32_arm_howto_table_1): Fix bitmasks for MOVW and
  2223. MOVT relocations.
  2224. (elf32_arm_final_link_relocate): Fix off by one MOVW/MOVT sign
  2225. extension.
  2226. (elf32_arm_relocate_section): Handle MOVW and MOVT
  2227. relocations. Improve safety check for other weird relocations.
  2228. (elf32_arm_check_relocs): Only set h->needs_plt for branch/call
  2229. relocations.
  2230. 2008-03-03 Bob Wilson <bob.wilson@acm.org>
  2231. * xtensa-isa.c (xtensa_isa_num_pipe_stages): Make max_stage static and
  2232. only compute its value once.
  2233. 2008-03-03 Alan Modra <amodra@bigpond.net.au>
  2234. * elf32-spu.c (struct got_entry): Add "addend" field.
  2235. (count_stub, build_stub): Use a new stub if relocation addend
  2236. differs from existing stubs for this symbol.
  2237. (process_stubs): Deal with addends.
  2238. (spu_elf_relocate_section, spu_elf_output_symbol_hook): Likewise.
  2239. 2008-03-02 H.J. Lu <hongjiu.lu@intel.com>
  2240. PR ld/5789
  2241. * elflink.c (_bfd_elf_symbol_refs_local_p): Always return true
  2242. for hidden and local symbols.
  2243. 2008-03-03 Alan Modra <amodra@bigpond.net.au>
  2244. * elf32-ppc.c (allocate_dynrelocs): Discard relocs on
  2245. undefined symbols with internal or hidden visibility.
  2246. (ppc_elf_relocate_section): Likewise. Use SYMBOL_CALLS_LOCAL
  2247. rather than SYMBOL_REFERENCES_LOCAL on branches. Don't
  2248. return immediately on dynamic reloc error.
  2249. 2008-03-01 Alan Modra <amodra@bigpond.net.au>
  2250. * elf64-ppc.c (build_plt_stub): Add relocs on plt call stubs
  2251. if emitrelocations.
  2252. (get_relocs): New function, split out from..
  2253. (ppc_build_one_stub): ..here. Add relocs on plt_branch stubs if
  2254. emitrelocations. Remove indx temp.
  2255. (ppc_size_one_stub): Count new stub relocs.
  2256. (ppc64_elf_size_stubs): Count new glink reloc.
  2257. (ppc64_elf_build_stubs): Emit glink reloc if emitrelocations.
  2258. (ppc64_elf_finish_dynamic_sections): Output glink relocs.
  2259. * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Describe non-pic
  2260. glink code.
  2261. 2008-02-28 Alan Modra <amodra@bigpond.net.au>
  2262. * elf32-spu.c (mark_functions_via_relocs): Don't assume that
  2263. the "->start" pointer reaches to function origin, so that we
  2264. can handle functions split over more than two sections.
  2265. (build_call_tree): Likewise.
  2266. (pasted_function): Don't attempt to set fun->start back to the
  2267. function origin, just go back one section.
  2268. 2008-02-27 Catherine Moore <clm@codesourcery.com>
  2269. * elf.c ( _bfd_elf_print_private_bfd_data): Call
  2270. elf_backend_get_target_dtag if defined.
  2271. * elf32-mips.c (elf_backend_get_target_dtag): Define.
  2272. * elf64-mips.c: Likewise.
  2273. * elfn32-mips.c: Likewise.
  2274. * elfxx-mips.c (_bfd_mips_elf_get_target_dtag): New.
  2275. * elfxx-mips.h (_bfd_mips_elf_get_target_dtag): Declare.
  2276. * elf-bfd.h (elf_backend_get_target_dtag): Add prototype.
  2277. * elfxx-target.h (elf_backend_get_target_dtag): Add default.
  2278. (elf_backend_data): Add elf_backend_get_target_dtag.
  2279. 2008-02-26 Alan Modra <amodra@bigpond.net.au>
  2280. * elf32-ppc.c (ppc_elf_check_relocs): Set pointer_equality_needed
  2281. for R_PPC_REL32 syms. Don't set non_got_ref on branch reloc syms,
  2282. and assume branch relocs are not dynamic when non-shared.
  2283. (readonly_dynrelocs): New function, split out from..
  2284. (maybe_set_textrel): ..here, renamed from old readonly_dynrelocs.
  2285. (ppc_elf_adjust_dynamic_symbol): For symbols generating plt entries,
  2286. clear non_got_ref..
  2287. (allocate_dynrelocs): ..and don't set u.def for undefined weak.
  2288. Do allow dynamic relocs on undefined symbols.
  2289. (ppc_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
  2290. (ppc_elf_relocate_section): Mirror dynamic reloc changes in
  2291. check_relocs.
  2292. (ppc_elf_finish_dynamic_symbol): Don't give a warning on weak
  2293. plt symbols needing pointer_equality_needed.
  2294. 2008-02-23 Alan Modra <amodra@bigpond.net.au>
  2295. * elf32-ppc.c (ppc_elf_check_relocs): Revert non_got_ref change.
  2296. 2008-02-23 Alan Modra <amodra@bigpond.net.au>
  2297. * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Copy
  2298. pointer_equality_needed.
  2299. (ppc_elf_check_relocs): Split out non-branch relocs from others
  2300. that might emit dynamic relocs. Set pointer_equality_needed
  2301. for their symbols. Don't set non_got_ref on branch reloc symbols.
  2302. (ppc_elf_hash_symbol): New function.
  2303. (elf_backend_hash_symbol): Define.
  2304. (ppc_elf_finish_dynamic_symbol): Handle pointer_equality_needed.
  2305. Error if pointer_equality_needed on weak plt symbol.
  2306. 2008-02-22 H.J. Lu <hongjiu.lu@intel.com>
  2307. PR ld/5788
  2308. * elflink.c (elf_create_symbuf): Correct buffer size and
  2309. position.
  2310. 2008-02-22 Nick Clifton <nickc@redhat.com>
  2311. PR 868
  2312. * dwarf2.c: Revert previous patch. All of the allocate memory is
  2313. on an obstack which will be freed at some other time.
  2314. 2008-02-20 Nick Clifton <nickc@redhat.com>
  2315. PR 868
  2316. * libbfd.c (bfd_realloc_or_free): New function. Performs like
  2317. bfd_realloc, but if the (re)allocation fails, the pointer is
  2318. freed.
  2319. * libbfd-in.h: Prototype.
  2320. * libbfd.h: Regenerate.
  2321. * bfdio.c (bfd_bwrite): Use the new function.
  2322. (bfd_seek): Likewise.
  2323. * bfdwin.c:(bfd_get_file_window): Likewise.
  2324. * elf-strtab.c (_bfd_elf_strtab_add): Likewise.
  2325. * elf32-ppc.c (ppc_elf_relax_section): Likewise.
  2326. * elf32-xtensa.c (vsprintf_msg): Likewise.
  2327. * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
  2328. * stabs.c (_bfd_link_seciton_stabs): Likewise.
  2329. * vms-misc.c (_bfd_vms_get_record): Likewise.
  2330. * vms-tir.c (check_section): Likewise.
  2331. * vms.c (vms_new_section_hook): Likewise.
  2332. * elf32-arm.c (elf32_arm_section_map_add): Check that the
  2333. allocation of sec_data->map succeeded before using it.
  2334. * elflink.c (elf_link_output_sym): Do not overwrite finfo->
  2335. symshndxbuf until it is known that the reallocation succeeded.
  2336. 2008-02-20 Diogo de Carvalho Kraemer <diogo@kraemer.eng.br>
  2337. Nick Clifton <nickc@redhat.com>
  2338. PR 868
  2339. * dwarf2.c (read_abbrevs): Free the abbreviation table if we run
  2340. out of memory.
  2341. (decode_line_info): Free the line_info_table before returning a
  2342. failure result.
  2343. (_bfd_dwarf2_cleanup_debug_info): Free the abbreviation table.
  2344. Free the line table. Free the function table. Free the variable
  2345. table.
  2346. 2008-02-17 Mark Kettenis <kettenis@gnu.org>
  2347. * elf.c (swap_out_syms): Avoid preprocessing directive within
  2348. macro arg.
  2349. 2008-02-17 Jan Kratochvil <jan.kratochvil@redhat.com>
  2350. * elf.c (assign_file_positions_for_load_sections): Set the type of
  2351. PT_NOTE sections to SHT_NOTE.
  2352. 2008-02-17 Ulrich Weigand <uweigand@de.ibm.com>
  2353. * simple.c (bfd_simple_get_relocated_section_contents): Set
  2354. link_info.output_bfd.
  2355. 2008-02-16 Nathan Sidwell <nathan@codesourcery.com>
  2356. * dwarf2.c (find_line): Don't trust debug information after an
  2357. unparseable compilation unit.
  2358. 2008-02-15 Alan Modra <amodra@bigpond.net.au>
  2359. PR 5765
  2360. * section.c (SEC_LINK_DUPLICATES): Correct. Renumber following flags.
  2361. * bfd-in2.h: Regenerate.
  2362. 2008-02-15 Alan Modra <amodra@bigpond.net.au>
  2363. * elf-bfd.h (enum elf_object_id): Add HPPA_ELF_TDATA.
  2364. * elf.c (bfd_elf_allocate_object): Don't check for already allocated
  2365. tdata.
  2366. * elf32-hppa.c (elf32_hppa_mkobject): New function.
  2367. (bfd_elf32_mkobject): Define.
  2368. * elf32-ppc.c (is_ppc_elf_target): Delete. Replace all uses with..
  2369. (is_ppc_elf): ..this new macro.
  2370. * elf64-ppc.c (is_ppc64_elf_target): Delete. Replace all uses with..
  2371. (is_ppc64_elf): ..this new macro.
  2372. 2008-02-15 Alan Modra <amodra@bigpond.net.au>
  2373. * elflink.c: Replace all accesses to hash->creator field with
  2374. output_bfd->xvec.
  2375. * cofflink.c: Likewise.
  2376. * coff-h8300.c: Likewise.
  2377. * ecoff.c: Likewise.
  2378. * elf32-m68hc1x.c: Likewise.
  2379. * elf32-ppc.c: Likewise.
  2380. * elf64-alpha.c: Likewise.
  2381. * elf64-ppc.c: Likewise.
  2382. * elf64-sparc.c: Likewise.
  2383. * elfxx-mips.c: Likewise.
  2384. * i386linux.c: Likewise.
  2385. * m68klinux.c: Likewise.
  2386. * sparclinux.c: Likewise.
  2387. * sunos.c: Likewise.
  2388. * xcofflink.c: Likewise.
  2389. * linker.c: Likewise.
  2390. (_bfd_link_hash_table_init): Don't store creator.
  2391. 2008-02-14 Peter Jones <pjones@redhat.com>
  2392. * efi-rtdrv-ia32.c: New file.
  2393. * efi-bsdrv-ia32.c: New file.
  2394. * efi-rtdrv-ia64.c: New file.
  2395. * efi-bsdrv-ia64.c: New file.
  2396. * efi-rtdrv-x86_64.c: New file.
  2397. * efi-bsdrv-x86_64.c: New file.
  2398. * peicode.h (pe_bfd_object_p): Add support for boot service and
  2399. runtime service drivers.
  2400. * libpei.h: Add macros for EFI formats, and rename the efi application
  2401. format macros to disambiguate.
  2402. * targets.c: Add bfd_target _vec externs.
  2403. (_bfd_tar): Add EFI _vec entries.
  2404. * config.bfd: Add EFI vectors into the selection routines.
  2405. * configure.in: add EFI _vec entries.
  2406. * configure: Regenerate.
  2407. * Makefile.am: Add EFI files.
  2408. * Makefile.in: Regenerate.
  2409. 2008-02-14 Nathan Sidwell <nathan@codesourcery.com>
  2410. * dwarf1.c (struct dwarf1_debug): Add syms member.
  2411. (alloc_dwarf1_unit, alloc_dwarf1_func): Check for out of memory.
  2412. (parse_line_table, _bfd_dwarf1_find_nearest_line): Relocate
  2413. section contents, check for out of memory.
  2414. * dwarf1.c (struct dwarf1_debug): Change data pointers to bfd_byte.
  2415. (parse_die): Change data pointers to bfd_byte.
  2416. (parse_line_table, parse_functions_in_unit): Likewise.
  2417. 2008-02-14 Alan Modra <amodra@bigpond.net.au>
  2418. * elflink.c (compute_bucket_count): Warning fixes.
  2419. 2008-02-12 DJ Delorie <dj@redhat.com>
  2420. * elf32-iq2000.c (iq2000_elf_relocate_section): Adjust addend of
  2421. relocation pointing to local symbol in merged section.
  2422. * elf32-iq2000.c (iq2000_elf_relocate_offset16): New.
  2423. (iq2000_elf_relocate_section): Call it.
  2424. 2008-02-12 Nick Clifton <nickc@redhat.com>
  2425. PR ld/5692
  2426. * elf-bfd.h (enum elf_object_id): New enum, used to identify
  2427. target specific extensions to the elf_obj_tdata structure.
  2428. (struct elf_obj_tdata): New field 'object_id'.
  2429. (elf_object_id, elf_program_header_size, elf_symtab_hdr): New
  2430. macros for accessing fields in the elf_obj_tdata structure.
  2431. (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object.
  2432. (bfd_elf_allocate_object): New function.
  2433. * elf.c (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object
  2434. and implement by calling bfd_elf_allocate_object.
  2435. (bfd_elf_allocate_object): New function: Allocates an
  2436. elf_obj_tdata structure, possibly with a target specific
  2437. extension.
  2438. * elfxx-target.h (bfd_elfNN_mkobject): Use
  2439. bfd_elf_make_generic_object as the default value.
  2440. * elf32-arm.c (elf32_arm_obj_tdata): Rename to elf_arm_obj_tdata
  2441. for consistency with other, similar structures.
  2442. (is_arm_elf): New macro. Checks a BFD to make sure that is an ARM
  2443. ELF bfd.
  2444. (elf32_arm_mkobject): Call bfd_elf_allocate_object.
  2445. (bfd_elf32_arm_vfp11_erratum_scan): Use is_arm_elf macro to check
  2446. the bfd being processed.
  2447. (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
  2448. (bfd_elf32_arm_set_target_relocs): Likewise.
  2449. (bfd_elf32_arm_final_link_relocate): Likewise.
  2450. (bfd_elf32_arm_copy_private_bfd_data): Likewise.
  2451. (bfd_elf32_arm_merge_eabi_attributes): Likewise.
  2452. (bfd_elf32_arm_merge_private_bfd_data): Likewise.
  2453. (bfd_elf32_arm_check_relocs): Likewise.
  2454. (bfd_elf32_arm_gc_mark_extra_sections): Likewise.
  2455. (bfd_elf32_arm_size_dynamic_sections): Likewise.
  2456. (bfd_elf32_arm_process_before_allocation): Use elf_symtab_hdr.
  2457. (bfd_elf32_arm_init_maps): Likewise.
  2458. (bfd_elf32_arm_final_link_relocate): Likewise.
  2459. (bfd_elf32_arm_relocate_section): Likewise.
  2460. (bfd_elf32_arm_gc_sweep_hook): Likewise.
  2461. (bfd_elf32_arm_check_relocs): Likewise.
  2462. (bfd_elf32_arm_size_dynamic_sections): Likewise.
  2463. * elf32-i386.c (elf_i386_mkobject): Call bfd_elf_allocate_object.
  2464. (is_i386_elf): New macro. Checks a BFD to make sure that is an x86
  2465. ELF bfd.
  2466. (elf_i386_check_relocs): Use is_i386_elf macro to check the bfd
  2467. being processed.
  2468. (elf_i386_size_dynamic_sections): Likewise.
  2469. (elf_i386_relocate_section): Likewise.
  2470. (elf_i386_check_relocs): Use elf_symtab_hdr.
  2471. (elf_i386_gc_sweep_hook): Likewise.
  2472. (elf_i386_size_dynamic_sections): Likewise.
  2473. (elf_i386_relocate_section): Likewise.
  2474. * elf32-ppc.c (ppc_elf_mkobject): Call bfd_elf_allocate_object.
  2475. (elf_create_pointer_linker_section): Use is_ppc_elf_target to
  2476. verify that the bfd before accessing target specific fields.
  2477. (ppc_elf_check_relocs): Likewise.
  2478. (elf_finish_pointer_linker_section): Likewise.
  2479. (elf_create_pointer_linker_section): Use elf_symtab_hdr.
  2480. (ppc_elf_check_relocs): Likewise.
  2481. (ppc_elf_gc_sweep_hook): Likewise.
  2482. (ppc_elf_tls_optimize): Likewise.
  2483. (ppc_elf_size_dynamic_sections): Likewise.
  2484. (ppc_elf_relax_section): Likewise.
  2485. (ppc_elf_relocate_section): Likewise.
  2486. * elf32-s390.c (struct elf_s390_obj_tdata): Add a comment
  2487. reminding programmers to keep this structure in sync with the one
  2488. defined in elf64-s390.c.
  2489. (elf_s390_mkobject): Call bfd_elf_allocate_object.
  2490. (is_s390_elf): New macro. Checks a BFD to make sure that is an s390
  2491. ELF bfd.
  2492. (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd
  2493. being processed.
  2494. (elf_s390_size_dynamic_sections): Likewise.
  2495. (elf_s390_relocate_section): Likewise.
  2496. (elf_s390_check_relocs): Use elf_symtab_hdr.
  2497. (elf_s390_gc_sweep_hook): Likewise.
  2498. (elf_s390_size_dynamic_sections): Likewise.
  2499. (elf_s390_relocate_section): Likewise.
  2500. * elf32-sh.c (sh_elf_mkobject): Call bfd_elf_allocate_object.
  2501. (is_sh_elf): New macro. Checks a BFD to make sure that is an SH
  2502. ELF bfd.
  2503. (sh_elf_size_dynamic_sections): Use is_sh_elf macro to check the
  2504. bfd being processed.
  2505. (sh_elf_relocate_section): Likewise.
  2506. (sh_elf_check_relocs): Likewise.
  2507. (sh_elf_copy_private_data): Likewise.
  2508. (sh_elf_relax_section): Use elf_symtab_hdr.
  2509. (sh_elf_size_dynamic_sections): Likewise.
  2510. (sh_elf_relocate_section): Likewise.
  2511. (sh_elf_get_relocated_section_contents): Likewise.
  2512. (sh_elf_gc_sweep_hook): Likewise.
  2513. (sh_elf_check_relocs): Likewise.
  2514. * elf64-alpha.c (elf64_alpha_mkobject): Call bfd_elf_allocate_object.
  2515. (is_alpha_elf): New macro. Checks a BFD to make sure that is an
  2516. Alpha ELF bfd.
  2517. (elf64_alpha_create_got_section): Use is_alpha_elf macro to check
  2518. the bfd being processed.
  2519. (elf64_alpha_create_dynamic_section): Likewise.
  2520. (elf64_alpha_check_relocs): Likewise.
  2521. (elf64_alpha_size_got_sections): Likewise.
  2522. (elf64_alpha_relax_section): Likewise.
  2523. (elf64_alpha_relocate_section): Likewise.
  2524. (elf64_alpha_final_link): Likewise.
  2525. (elf64_alpha_check_relocs): Use elf_symtab_hdr.
  2526. (elf64_alpha_relax_section): Likewise.
  2527. (elf64_alpha_relocate_section_r): Likewise.
  2528. (elf64_alpha_relocate_section): Likewise.
  2529. * elf64-ppc.c (ppc64_elf_mkobject): Call bfd_elf_allocate_object.
  2530. (ppc64_elf_check_relocs): Use is_ppc64_elf_target to check the bfd
  2531. being processed.
  2532. (opd_entry_value): Likewise.
  2533. (allocate_dynrelocs): Likewise.
  2534. (ppc64_elf_relocate_section): Likewise.
  2535. (ppc64_elf_check_relocs): Use elf_symtab_hdr.
  2536. (opd_entry_value): Likewise.
  2537. (ppc64_elf_gc_sweep_hook): Likewise.
  2538. (get_sym_h): Likewise.
  2539. (ppc64_elf_edit_opd): Likewise.
  2540. (ppc64_elf_tls_optimize): Likewise.
  2541. (ppc64_elf_edit_toc): Likewise.
  2542. (ppc64_elf_size_dynamic_sections): Likewise.
  2543. (toc_adjusting_stub_needed): Likewise.
  2544. (ppc64_elf_size_stubs): Likewise.
  2545. (ppc64_elf_relocate_section): Likewise.
  2546. * elf64-s390.c (struct elf_s390_obj_tdata): Add a comment
  2547. reminding programmers to keep this structure in sync with the one
  2548. defined in elf32-s390.c.
  2549. (elf_s390_mkobject): Call bfd_elf_allocate_object.
  2550. (is_s390_elf): New macro. Checks a BFD to make sure that is an s390
  2551. ELF bfd.
  2552. (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd
  2553. being processed.
  2554. (elf_s390_size_dynamic_sections): Likewise.
  2555. (elf_s390_relocate_section): Likewise.
  2556. (elf_s390_check_relocs): Use elf_symtab_hdr.
  2557. (elf_s390_gc_sweep_hook): Likewise.
  2558. (elf_s390_size_dynamic_sections): Likewise.
  2559. (elf_s390_relocate_section): Likewise.
  2560. * elf64-x86_64.c (elf64_x86_64_mkobject): Call bfd_elf_allocate_object.
  2561. (is_x86_64_elf): New macro. Checks a BFD to make sure that is an
  2562. x86_64 ELF bfd.
  2563. (elf64_x86_64_check_relocs): Use is_x86_64_elf macro to check the bfd
  2564. being processed.
  2565. (elf64_x86_64_size_dynamic_sections): Likewise.
  2566. (elf64_x86_64_relocate_section): Likewise.
  2567. (elf64_x86_64_check_relocs): Use elf_symtab_hdr.
  2568. (elf64_x86_64_gc_sweep_hook): Likewise.
  2569. (elf64_x86_64_size_dynamic_sections): Likewise.
  2570. (elf64_x86_64_relocate_section): Likewise.
  2571. * elfxx-sparc.c (_bfd_sparc_elf_mkobject): Call bfd_elf_allocate_object.
  2572. (is_sparc_elf): New macro. Checks a BFD to make sure that is a Sparc
  2573. ELF bfd.
  2574. (_bfd_sparc_elf_check_relocs): Use is_sparc_elf macro to check the
  2575. bfd being processed.
  2576. (_bfd_sparc_elf_gc_sweep_hook): Likewise.
  2577. (_bfd_sparc_elf_size_dynamic_sections): Likewise.
  2578. (_bfd_sparc_elf_check_relocs): Use elf_symtab_hdr.
  2579. (_bfd_sparc_elf_gc_sweep_hook): Likewise.
  2580. (_bfd_sparc_elf_size_dynamic_sections): Likewise.
  2581. (_bfd_sparc_elf_relocate_section): Likewise.
  2582. 2008-02-12 Alan Modra <amodra@bigpond.net.au>
  2583. PR 5303, 5755
  2584. * arange-set.c: Delete.
  2585. * arange-set.h: Delete.
  2586. * dwarf2.c: Revert 2007-09-21 changes.
  2587. * Makefile.am: Likewise.
  2588. * Makefile.in: Regenerate.
  2589. * po/SRC-POTFILES.in: Regenerate.
  2590. 2008-02-11 Bernd Schmidt <bernd.schmidt@analog.com>
  2591. * elf32-bfin.c (bfin_relocate_section): Set up dynobj before using it
  2592. if necessary.
  2593. (elf32_bfin_merge_private_bfd_data): Simplify, and ensure object type
  2594. mismatches are detected.
  2595. * elf32-bfin.c (bfinfdpic_relocate_section): Take more care not to
  2596. emit invalid relocs or rofixup entries for deleted .eh_frame entries.
  2597. 2008-02-11 Daniel Jacobowitz <dan@codesourcery.com>
  2598. * cache.c (cache_bread): Set bfd_error_file_truncated if EOF
  2599. was reached.
  2600. * srec.c (srec_scan): Calculate the checksum. Complain on mismatch.
  2601. 2008-02-07 Alan Modra <amodra@bigpond.net.au>
  2602. * elf32-spu.c (spu_elf_size_stubs): Revert 2008-01-28 doubling
  2603. of _ovly_buf_table size.
  2604. (spu_elf_build_stubs): Use low bit of .size as "present" bit.
  2605. Adjust initialisations relating to _ovly_buf_table.
  2606. 2008-02-04 Bob Wilson <bob.wilson@acm.org>
  2607. * elf32-xtensa (elf_xtensa_relocate_section): After finding an invalid
  2608. relocation, do not continue processing it. Ignore R_XTENSA_ASM_EXPAND
  2609. relocations against dynamic symbols.
  2610. (elf_xtensa_finish_dynamic_sections): Do not fail if there is no
  2611. .xt.lit section.
  2612. 2008-02-04 Kai Tietz <kai.tietz@onevision.com>
  2613. H.J. Lu <hongjiu.lu@intel.com>
  2614. PR 5715
  2615. * warning.m4: Enable -Wno-format by default when using gcc on
  2616. mingw.
  2617. * configure: Regenerated.
  2618. 2008-02-04 Adam Nemet <anemet@caviumnetworks.com>
  2619. * archures.c: Update copyright.
  2620. (bfd_mach_mips_octeon): New macro.
  2621. * bfd-in2.h: Regenerate.
  2622. * elfxx-mips.c (_bfd_elf_mips_mach): Handle Octeon.
  2623. (mips_set_isa_flags): Likewise.
  2624. (mips_mach_extensions): Add Octeon.
  2625. * cpu-mips.c: Update copyright.
  2626. (I_mipsocteon): New enum constant.
  2627. (arch_info_struct): Add Octeon.
  2628. 2008-02-04 Alan Modra <amodra@bigpond.net.au>
  2629. * elf32-spu.c (spu_elf_relocate_section): Correct return type.
  2630. Return error status on unexpected relocation errors.
  2631. 2008-02-04 Alan Modra <amodra@bigpond.net.au>
  2632. PR ld/5692
  2633. * elf.c (bfd_elf_get_elf_syms): Revert 2008-01-31. Instead abort
  2634. on non-ELF input.
  2635. * elf32-arm.c (elf32_arm_size_dynamic_sections): Skip glue
  2636. processing on non-ELF input.
  2637. 2008-01-31 Marc Gauthier <marc@tensilica.com>
  2638. * config.bfd (xtensa*-*-*): Recognize processor variants.
  2639. 2008-01-31 Nick Clifton <nickc@redhat.com>
  2640. PR ld/5692
  2641. * elf.c (bfd_elf_get_elf_syms): Check the return value of
  2642. get_elf_backend_data.
  2643. 2008-01-28 Fabian Groffen <grobian@gentoo.org>
  2644. * config.bfd (x86_64-*-solaris2): Add support for this target.
  2645. 2008-01-28 Alan Modra <amodra@bigpond.net.au>
  2646. Rewrite SPU overlay handling code. Put overlay calls stubs in the
  2647. overlays where possible. Use a faster call stub, or optionally at
  2648. compile time, a more compact stub. Double size of _ovly_buf_table
  2649. so that low bit of _ovly_table.buf can be used as a "present" bit.
  2650. Reserve an extra _ovly_table entry for index zero.
  2651. * elf32-spu.c: (struct spu_link_hash_table): Delete a number of fields,
  2652. add new ones.
  2653. (struct got_entry): New.
  2654. (struct spu_stub_hash_entry): Delete.
  2655. (stub_hash_newfunc, spu_elf_link_hash_table_free): Delete.
  2656. (spu_elf_link_hash_table_create): Adjust for struct changes.
  2657. (spu_stub_name): Delete.
  2658. (spu_elf_find_overlays): Don't track sections from overlay regions.
  2659. Instead set ovl_buf number in spu elf section data. Error if
  2660. overlays in one region don't start at the same address. Adjust
  2661. for struct _spu_elf_section_data changes.
  2662. (SIZEOF_STUB1, SIZEOF_STUB2, ILA_79, ILA_78): Delete.
  2663. (OVL_STUB_SIZE, BRSL, LNOP, ILA): Define.
  2664. (needs_ovl_stub): Adjust for struct _spu_elf_section_data changes.
  2665. (enum _insn_type): New.
  2666. (count_stub, build_stub): New functions.
  2667. (allocate_spuear_stubs): Use count_stub.
  2668. (build_spuear_stubs): Use build_stub.
  2669. (populate_stubs, sort_stubs): Delete.
  2670. (process_stubs): New function.
  2671. (write_one_stub): Delete.
  2672. (spu_elf_size_stubs, spu_elf_build_stubs): Rewrite.
  2673. (alloc_stack_info): Adjust for struct _spu_elf_section_data changes.
  2674. (maybe_insert_function, check_function_ranges): Likewise.
  2675. (find_function, pasted_function, build_call_tree): Likewise.
  2676. (spu_elf_stack_analysis, spu_elf_modify_segment_map): Likewise.
  2677. (spu_elf_modify_program_headers): Likewise.
  2678. (interesting_section): Detect stub sections differently. Delete
  2679. htab param, adjust all callers.
  2680. (spu_elf_relocate_section): Rewrite stub handling.
  2681. (spu_elf_output_symbol_hook): Likewise.
  2682. (bfd_elf32_bfd_link_hash_table_free): Delete.
  2683. * elf32-spu.h (struct _spu_elf_section_data): Move input-only and
  2684. output-only fields into a union. Add ovl_buf.
  2685. (spu_elf_size_stubs, spu_elf_build_stubs): Update prototypes.
  2686. 2008-01-25 DJ Delorie <dj@redhat.com>
  2687. * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): New.
  2688. 2008-01-25 Kai Tietz <kai.tietz@onevision.com>
  2689. * bfd-in.h: Add mingw I64 support.
  2690. * bfd-in2.h: Regenerated.
  2691. * bfd.c: (bfd_get_sign_extend_vma): Add pe-x86-64 and pei-x86-64.
  2692. 2008-01-21 Alan Modra <amodra@bigpond.net.au>
  2693. PR 4453
  2694. * format.c (bfd_check_format_matches): Don't accept archives as
  2695. fully matching unless they have a map.
  2696. 2008-01-21 Alan Modra <amodra@bigpond.net.au>
  2697. * elflink.c (_bfd_elf_link_output_relocs): Correct error return.
  2698. 2008-01-21 Alan Modra <amodra@bigpond.net.au>
  2699. * ecoff.c (_bfd_ecoff_archive_p): Delete.
  2700. * libecoff.h (_bfd_ecoff_archive_p): Delete.
  2701. * coff-alpha.c (ecoffalpha_little_vec): Use bfd_generic_archive_p.
  2702. * coff-mips.c (ecoff_little_vec, ecoff_big_vec): Likewise.
  2703. (ecoff_biglittle_vec): Likewise.
  2704. 2008-01-19 Alan Modra <amodra@bigpond.net.au>
  2705. PR 5646
  2706. * elf64-ppc.c (ppc64_elf_tls_optimize): Ensure htab->tls_get_addr
  2707. non-NULL before dereferencing.
  2708. 2008-01-15 Alan Modra <amodra@bigpond.net.au>
  2709. PR 5604
  2710. * elf-bfd.h (struct elf_backend_data): Add gc_keep. Remove param
  2711. names from others.
  2712. (_bfd_elf_gc_keep): Declare.
  2713. * elfxx-target.h (elf_backend_gc_keep): Define.
  2714. (elfNN_bed): Init new field.
  2715. * elflink.c (_bfd_elf_gc_keep): New function.
  2716. (bfd_elf_gc_sections): Call gc_keep.
  2717. * elf64-ppc.c (elf_backend_gc_keep): Define.
  2718. (struct _ppc64_elf_section_data): Move .opd related fields to
  2719. a struct so they don't occupy the same storage. Adjust accesses
  2720. throughout file.
  2721. (ppc64_elf_gc_keep): New function, split out from..
  2722. (ppc64_elf_gc_mark_hook): ..here. Don't call _bfd_elf_gc_mark
  2723. to mark .opd section, just set gc_mark.
  2724. (ppc64_elf_edit_opd): Remove no_opd_opt parm. Don't set opd->adjust
  2725. unless we are changing .opd. Test non-NULL opd->adjust at all
  2726. accesses throughout file.
  2727. * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
  2728. 2008-01-15 Alan Modra <amodra@bigpond.net.au>
  2729. * bfd-in.h (BFD_HOST_LONG_LONG): Delete.
  2730. * bfd-in2.h: Regenerate.
  2731. 2008-01-11 Tristan Gingold <gingold@adacore.com>
  2732. Eric Botcazou <ebotcazou@adacore.com>
  2733. * elf32-ppc.c (ppc_elf_gc_sweep_hook): Exit early if generating a
  2734. relocatable.
  2735. * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
  2736. * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
  2737. * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
  2738. * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
  2739. * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
  2740. * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
  2741. * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
  2742. * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
  2743. * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
  2744. * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
  2745. * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
  2746. * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
  2747. * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Likewise.
  2748. * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
  2749. * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
  2750. * elflink.c (bfd_elf_gc_sections): Do not punt on relocatable output
  2751. or executable output with relocations.
  2752. 2008-01-09 Nick Clifton <nickc@redhat.com>
  2753. PR gas/5552
  2754. * elf32-fr30.c (fr30_elf_howto_table): Set partial_inplace field
  2755. to FALSE for all relocs.
  2756. 2008-01-09 Richard Sandiford <rsandifo@nildram.co.uk>
  2757. PR ld/5526
  2758. * elf-bfd.h (eh_cie_fde): Add u.cie.u.full_cie and u.cie.merged
  2759. fields. Rename u.cie.u.merged to u.cie.u.merged_with.
  2760. (eh_frame_sec_info): Add a cies field.
  2761. (eh_frame_hdr_info): Add a merge_cies field.
  2762. * elf-eh-frame.c (cie): Add a reloc_index member to the personality
  2763. union.
  2764. (_bfd_elf_begin_eh_frame_parsing): Set hdr_info->merge_cies instead
  2765. of hdr_info->cies.
  2766. (_bfd_elf_parse_eh_frame): Remove tmp_cie. Ccreate an array of
  2767. cie structures in all cases and use it instead of extended_cies.
  2768. If merging, store the cie array in sec_info->cies and point each
  2769. CIE's eh_fde_cie at the associated element. Do not try to
  2770. calculate the value of the personality routine here; record the
  2771. offset of the relocation instead. Do not merge CIEs here.
  2772. (_bfd_elf_end_eh_frame_parsing): Do not free hdr_info->cies here...
  2773. (_bfd_elf_discard_section_eh_frame_hdr): ...do it here instead.
  2774. (_bfd_elf_gc_mark_fdes): Mark the original (unmerged) CIE.
  2775. (find_merged_cie): New function.
  2776. (_bfd_elf_gc_mark_fdes): Use it. Free sec_info->cies.
  2777. 2008-01-07 Nick Clifton <nickc@redhat.com>
  2778. PR binutils/5535
  2779. * vms.c (vms_close_and_cleanup): Check for the presence of a
  2780. vms_private_data_struct before examining any of its fields.
  2781. 2008-01-07 H.J. Lu <hongjiu.lu@intel.com>
  2782. PR ld/5522
  2783. * elflink.c (elf_link_input_bfd): Don't write out a section if
  2784. its output section is marked with SEC_NEVER_LOAD.
  2785. For older changes see ChangeLog-2007
  2786. Copyright (C) 2008 Free Software Foundation, Inc.
  2787. Copying and distribution of this file, with or without modification,
  2788. are permitted in any medium without royalty provided the copyright
  2789. notice and this notice are preserved.
  2790. Local Variables:
  2791. mode: change-log
  2792. left-margin: 8
  2793. fill-column: 74
  2794. version-control: never
  2795. End: