branch-updates.diff 166 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431
  1. # DP: updates from the binutils-2.31 branch
  2. # git diff 0860693812fff944ab0602e72b762a4a2078da5b 0f494b01431de53959dd72ccfed06a01d5172e3f
  3. diff --git a/bfd/ChangeLog b/bfd/ChangeLog
  4. index 5ec906aa8e..fa4173da3a 100644
  5. --- a/bfd/ChangeLog
  6. +++ b/bfd/ChangeLog
  7. @@ -1,8 +1,162 @@
  8. +2018-11-30 Alan Modra <amodra@gmail.com>
  9. +
  10. + PR 23937
  11. + * elf64-ppc.c (write_plt_relocs_for_local_syms): Don't add local
  12. + entry offset for ifuncs.
  13. +
  14. +2018-11-27 Tamar Christina <tamar.christina@arm.com>
  15. +
  16. + Backport from mainline
  17. + PR ld/23904
  18. + * elfnn-aarch64.c (_bfd_aarch64_adrp_p): Use existing constants.
  19. + (_bfd_aarch64_erratum_843419_branch_to_stub): Use _bfd_aarch64_adrp_p.
  20. + (struct erratum_835769_branch_to_stub_clear_data): New.
  21. + (_bfd_aarch64_erratum_843419_clear_stub): New.
  22. + (clear_erratum_843419_entry): New.
  23. + (elfNN_aarch64_tls_relax): Use it.
  24. + (elfNN_aarch64_relocate_section): Pass input_section.
  25. + (aarch64_map_one_stub): Handle branch type none as valid.
  26. +
  27. +2018-11-15 Claudiu Zissulescu <claziss@synopsys.com>
  28. +
  29. + Backport from mainline
  30. + 2018-11-09 Cupertino Miranda <cmiranda@synopsys.com>
  31. + * arc-got.h (arc_got_entry_type_for_reloc): Changed to
  32. + correct static TLS relocs.
  33. + * elf32-arc.c (elf_arc_check_relocs): Introduced warning to
  34. + TLS relocs which require -fPIC.
  35. + (arc_create_forced_local_got_entries_for_tls): Created.
  36. + Traverses list of GOT entries to be resolved statically
  37. + when needed.
  38. + (elf_arc_finish_dynamic_sections): Changed. Calls
  39. + arc_create_forced_local_got_entries_for_tls for each known
  40. + possibly GOT symbol.
  41. +
  42. +2018-11-15 Claudiu Zissulescu <claziss@synopsys.com>
  43. +
  44. + Backport from mainline
  45. + 2018-11-09 Claudiu Zissulescu <claziss@synopsys.com>
  46. + * arc-got.h (arc_get_local_got_ents): Revamp it; use
  47. + elf_local_got_ents to store the local got list.
  48. + (get_got_entry_list_for_symbo): Restructure it.
  49. + * elf32-arc.c (elf_arc_relocate_section): Correct the call to
  50. + get_got_entry_list_for_symbol.
  51. +
  52. +2018-11-15 Claudiu Zissulescu <claziss@synopsys.com>
  53. +
  54. + Backport from mainline
  55. + 2018-09-06 Cupertino Miranda <cmiranda@synopsys.com>
  56. + * arc-got.h (relocate_fix_got_relocs_for_got_info): Changed. Take
  57. + TLS section alignment in consideration for this relocation.
  58. + * elf32-arc.c (FINAL_SECTSTART): Added this formula macro.
  59. + (ARC_TLS_DTPOFF) Updated reloc to use new created macro instead.
  60. +
  61. +2018-11-15 Claudiu Zissulescu <claziss@synopsys.com>
  62. +
  63. + Backport from mainline
  64. + 2018-08-01 Cupertino Miranda <cmiranda@synopsys.com>
  65. + * arc-got.h (relocate_fix_got_relocs_for_got_info): Changed, fixed
  66. + TCB_SIZE offsize to include section alignment.
  67. + * elf32-arc.c (arc_special_overflow_checks): Likewise.
  68. +
  69. +2018-11-15 Claudiu Zissulescu <claziss@synopsys.com>
  70. +
  71. + Backport from mainline
  72. + 2018-03-02 Cupertino Miranda <cmiranda@synopsys.com>
  73. + * elf32-arc.c (elf_arc_check_relocs): Changed.
  74. +
  75. +2018-11-15 Claudiu Zissulescu <claziss@synopsys.com>
  76. +
  77. + Backport from mainline
  78. + 2018-03-02 Cupertino Miranda <cmiranda@synopsys.com>
  79. + * elf32-arc.c (elf_arc_check_relocs): Changed.
  80. +
  81. +2018-11-15 Claudiu Zissulescu <claziss@synopsys.com>
  82. +
  83. + Backport from mainline
  84. + 2018-03-02 Cupertino Miranda <cmiranda@synopsys.com>
  85. + * elf32-arc.c (elf_arc_finish_dynamic_symbol) Return FALSE in case
  86. + arc_htab is NULL.
  87. +
  88. +2018-11-15 Claudiu Zissulescu <claziss@synopsys.com>
  89. +
  90. + Backport from mainline
  91. + 2018-03-02 Cupertino Miranda <cmiranda@synopsys.com>a
  92. + * arc-got.h (get_got_entry_list_for_symbol): Changed.
  93. + * ef32-arc.c (struct elf_arc_link_hash_entry): Moved and changed.
  94. + (elf_arc_link_hash_newfunc): Changed.
  95. + (arc_elf_link_hash_table_create): Removed old initializations.
  96. + (elf_arc_relocate_section, elf_arc_finish_dynamic_symbol): Changed.
  97. +
  98. +2018-11-06 H.J. Lu <hongjiu.lu@intel.com>
  99. +
  100. + PR ld/23818
  101. + * elflink.c (_bfd_elf_link_assign_sym_version): Hide symbols
  102. + defined in discarded input sections.
  103. +
  104. +2018-09-12 H.J. Lu <hongjiu.lu@intel.com>
  105. +
  106. + PR ld/23499
  107. + * elf.c (_bfd_elf_get_symbol_version_string): Return
  108. + _("<corrupt>") for corrupt symbol version info.
  109. +
  110. +2018-09-12 H.J. Lu <hongjiu.lu@intel.com>
  111. +
  112. + PR ld/23499
  113. + * elflink.c (bfd_elf_record_link_assignment): Always clear
  114. + h->verinfo.verdef when overriding a dynamic definition.
  115. +
  116. +2018-08-12 H.J. Lu <hongjiu.lu@intel.com>
  117. +
  118. + PR ld/23428
  119. + * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't
  120. + add X86_ISA_1_NEEDED property only if existing properties won't
  121. + be removed.
  122. +
  123. +2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
  124. +
  125. + PR ld/23486
  126. + * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove
  127. + GNU_PROPERTY_X86_ISA_1_USED if an input file doesn't have it.
  128. + (_bfd_x86_elf_link_setup_gnu_properties): Adding the
  129. + GNU_PROPERTY_X86_ISA_1_NEEDED, instead of
  130. + GNU_PROPERTY_X86_ISA_1_USED, property.
  131. +
  132. +2018-08-07 Alan Modra <amodra@gmail.com>
  133. +
  134. + * elf64-ppc.c (ppc64_elf_relocate_section): Don't skip first
  135. + instruction of __tls_get_addr_opt stub.
  136. + (plt_stub_size): Omit ALWAYS_EMIT_R2SAVE condition when
  137. + dealing with __tls_get_addr_opt stub.
  138. + (build_tls_get_addr_stub, ppc_size_one_stub): Likewise.
  139. +
  140. +2018-08-01 Alan Modra <amodra@gmail.com>
  141. +
  142. + * elf64-ppc.c (plt_stub_pad): Delay plt_stub_size call until needed.
  143. + (ppc_build_one_stub): Don't set stub_offset, instead assert that
  144. + it is sane. Don't adjust stub_offset for alignment. Adjust size
  145. + calculation. Use "targ" temp when calculating offsets.
  146. + (ppc_size_one_stub): Set stub_offset here. Use "targ" temp when
  147. + calculating offsets. Adjust for alignment before setting
  148. + tls_get_addr_opt_bctrl.
  149. +
  150. +2018-07-23 H.J. Lu <hongjiu.lu@intel.com>
  151. +
  152. + PR ld/23428
  153. + * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): If the
  154. + separate code program header is needed, make sure that the first
  155. + read-only PT_LOAD segment has no code by adding a
  156. + GNU_PROPERTY_X86_ISA_1_USED note.
  157. +
  158. +2018-07-18 Nick Clifton <nickc@redhat.com>
  159. +
  160. + * development.sh: Set to true.
  161. +
  162. 2018-07-18 Nick Clifton <nickc@redhat.com>
  163. 2.31.1 Release point.
  164. * version.m4: Set to 2.31.1
  165. - * development.sh: Set to true.
  166. + * development.sh: Set to false.
  167. * configure: Regenerate.
  168. * po/bfd.pot: Regenerate.
  169. diff --git a/bfd/arc-got.h b/bfd/arc-got.h
  170. index a86061bcb3..253578b90c 100644
  171. --- a/bfd/arc-got.h
  172. +++ b/bfd/arc-got.h
  173. @@ -24,6 +24,9 @@
  174. #define TCB_SIZE (8)
  175. +#define align_power(addr, align) \
  176. + (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align))))
  177. +
  178. enum tls_type_e
  179. {
  180. GOT_UNKNOWN = 0,
  181. @@ -51,27 +54,26 @@ struct got_entry
  182. enum tls_got_entries existing_entries;
  183. };
  184. +/* Return the local got list, if not defined, create an empty one. */
  185. +
  186. static struct got_entry **
  187. arc_get_local_got_ents (bfd * abfd)
  188. {
  189. - static struct got_entry **local_got_ents = NULL;
  190. -
  191. - if (local_got_ents == NULL)
  192. + if (elf_local_got_ents (abfd) == NULL)
  193. {
  194. - size_t size;
  195. - Elf_Internal_Shdr *symtab_hdr = &((elf_tdata (abfd))->symtab_hdr);
  196. -
  197. - size = symtab_hdr->sh_info * sizeof (bfd_vma);
  198. - local_got_ents = (struct got_entry **)
  199. - bfd_alloc (abfd, sizeof (struct got_entry *) * size);
  200. - if (local_got_ents == NULL)
  201. - return FALSE;
  202. -
  203. - memset (local_got_ents, 0, sizeof (struct got_entry *) * size);
  204. - elf_local_got_ents (abfd) = local_got_ents;
  205. + bfd_size_type amt = (elf_tdata (abfd)->symtab_hdr.sh_info
  206. + * sizeof (*elf_local_got_ents (abfd)));
  207. + elf_local_got_ents (abfd) = bfd_zmalloc (amt);
  208. + if (elf_local_got_ents (abfd) == NULL)
  209. + {
  210. + _bfd_error_handler (_("%pB: cannot allocate memory for local "
  211. + "GOT entries"), abfd);
  212. + bfd_set_error (bfd_error_bad_value);
  213. + return NULL;
  214. + }
  215. }
  216. - return local_got_ents;
  217. + return elf_local_got_ents (abfd);
  218. }
  219. static struct got_entry *
  220. @@ -156,15 +158,15 @@ get_got_entry_list_for_symbol (bfd *abfd,
  221. unsigned long r_symndx,
  222. struct elf_link_hash_entry *h)
  223. {
  224. - if (h != NULL)
  225. + struct elf_arc_link_hash_entry *h1 =
  226. + ((struct elf_arc_link_hash_entry *) h);
  227. + if (h1 != NULL)
  228. {
  229. - return &h->got.glist;
  230. + return &h1->got_ents;
  231. }
  232. else
  233. {
  234. - struct got_entry **local_got_ents
  235. - = arc_get_local_got_ents (abfd);
  236. - return &local_got_ents[r_symndx];
  237. + return arc_get_local_got_ents (abfd) + r_symndx;
  238. }
  239. }
  240. @@ -206,7 +208,7 @@ arc_got_entry_type_for_reloc (reloc_howto_type *howto)
  241. __LINE__, name_for_global_symbol (H)); \
  242. } \
  243. if (H) \
  244. - if (h->dynindx == -1 && !h->forced_local) \
  245. + if (H->dynindx == -1 && !H->forced_local) \
  246. if (! bfd_elf_link_record_dynamic_symbol (info, H)) \
  247. return FALSE; \
  248. htab->s##SECNAME->size += 4; \
  249. @@ -282,6 +284,7 @@ relocate_fix_got_relocs_for_got_info (struct got_entry ** list_p,
  250. BFD_ASSERT (entry);
  251. if (h == NULL
  252. + || h->forced_local == TRUE
  253. || (! elf_hash_table (info)->dynamic_sections_created
  254. || (bfd_link_pic (info)
  255. && SYMBOL_REFERENCES_LOCAL (info, h))))
  256. @@ -329,23 +332,31 @@ relocate_fix_got_relocs_for_got_info (struct got_entry ** list_p,
  257. BFD_ASSERT (tls_sec && tls_sec->output_section);
  258. bfd_vma sec_vma = tls_sec->output_section->vma;
  259. - bfd_put_32 (output_bfd,
  260. - sym_value - sec_vma,
  261. + if (h == NULL || h->forced_local
  262. + || !elf_hash_table (info)->dynamic_sections_created)
  263. + {
  264. + bfd_put_32 (output_bfd,
  265. + sym_value - sec_vma
  266. + + (elf_hash_table (info)->dynamic_sections_created
  267. + ? 0
  268. + : (align_power (0,
  269. + tls_sec->alignment_power))),
  270. htab->sgot->contents + entry->offset
  271. + (entry->existing_entries == TLS_GOT_MOD_AND_OFF
  272. ? 4 : 0));
  273. - ARC_DEBUG ("arc_info: FIXED -> %s value = %#lx "
  274. - "@ %lx, for symbol %s\n",
  275. - (entry->type == GOT_TLS_GD ? "GOT_TLS_GD" :
  276. - "GOT_TLS_IE"),
  277. - (long) (sym_value - sec_vma),
  278. - (long) (htab->sgot->output_section->vma
  279. - + htab->sgot->output_offset->vma
  280. - + entry->offset
  281. - + (entry->existing_entries == TLS_GOT_MOD_AND_OFF
  282. - ? 4 : 0)),
  283. - symbol_name);
  284. + ARC_DEBUG ("arc_info: FIXED -> %s value = %#lx "
  285. + "@ %lx, for symbol %s\n",
  286. + (entry->type == GOT_TLS_GD ? "GOT_TLS_GD" :
  287. + "GOT_TLS_IE"),
  288. + (long) (sym_value - sec_vma),
  289. + (long) (htab->sgot->output_section->vma
  290. + + htab->sgot->output_offset
  291. + + entry->offset
  292. + + (entry->existing_entries == TLS_GOT_MOD_AND_OFF
  293. + ? 4 : 0)),
  294. + symbol_name);
  295. + }
  296. }
  297. break;
  298. @@ -357,7 +368,10 @@ relocate_fix_got_relocs_for_got_info (struct got_entry ** list_p,
  299. bfd_put_32 (output_bfd,
  300. sym_value - sec_vma
  301. - + (elf_hash_table (info)->dynamic_sections_created ? 0 : TCB_SIZE),
  302. + + (elf_hash_table (info)->dynamic_sections_created
  303. + ? 0
  304. + : (align_power (TCB_SIZE,
  305. + tls_sec->alignment_power))),
  306. htab->sgot->contents + entry->offset
  307. + (entry->existing_entries == TLS_GOT_MOD_AND_OFF
  308. ? 4 : 0));
  309. @@ -368,7 +382,7 @@ relocate_fix_got_relocs_for_got_info (struct got_entry ** list_p,
  310. "GOT_TLS_IE"),
  311. (long) (sym_value - sec_vma),
  312. (long) (htab->sgot->output_section->vma
  313. - + htab->sgot->output_offset->vma
  314. + + htab->sgot->output_offset
  315. + entry->offset
  316. + (entry->existing_entries == TLS_GOT_MOD_AND_OFF
  317. ? 4 : 0)),
  318. diff --git a/bfd/development.sh b/bfd/development.sh
  319. index 918150f30b..27a7150e6d 100644
  320. --- a/bfd/development.sh
  321. +++ b/bfd/development.sh
  322. @@ -16,4 +16,4 @@
  323. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  324. # Controls whether to enable development-mode features by default.
  325. -development=false
  326. +development=true
  327. diff --git a/bfd/elf.c b/bfd/elf.c
  328. index 0f75375128..80410575b0 100644
  329. --- a/bfd/elf.c
  330. +++ b/bfd/elf.c
  331. @@ -1877,7 +1877,7 @@ _bfd_elf_get_symbol_version_string (bfd *abfd, asymbol *symbol,
  332. {
  333. Elf_Internal_Verneed *t;
  334. - version_string = "";
  335. + version_string = _("<corrupt>");
  336. for (t = elf_tdata (abfd)->verref;
  337. t != NULL;
  338. t = t->vn_nextref)
  339. diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
  340. index a48ef0ca15..495fa342d3 100644
  341. --- a/bfd/elf32-arc.c
  342. +++ b/bfd/elf32-arc.c
  343. @@ -160,6 +160,18 @@ struct arc_relocation_data
  344. const char * symbol_name;
  345. };
  346. +/* ARC ELF linker hash entry. */
  347. +struct elf_arc_link_hash_entry
  348. +{
  349. + struct elf_link_hash_entry root;
  350. +
  351. + /* Track dynamic relocs copied for this symbol. */
  352. + struct elf_dyn_relocs *dyn_relocs;
  353. +
  354. + struct got_entry *got_ents;
  355. +};
  356. +
  357. +
  358. /* Should be included at this location due to static declarations
  359. defined before this point. */
  360. #include "arc-got.h"
  361. @@ -281,15 +293,6 @@ struct arc_reloc_map
  362. unsigned char elf_reloc_val;
  363. };
  364. -/* ARC ELF linker hash entry. */
  365. -struct elf_arc_link_hash_entry
  366. -{
  367. - struct elf_link_hash_entry root;
  368. -
  369. - /* Track dynamic relocs copied for this symbol. */
  370. - struct elf_dyn_relocs *dyn_relocs;
  371. -};
  372. -
  373. /* ARC ELF linker hash table. */
  374. struct elf_arc_link_hash_table
  375. {
  376. @@ -301,28 +304,28 @@ elf_arc_link_hash_newfunc (struct bfd_hash_entry *entry,
  377. struct bfd_hash_table *table,
  378. const char *string)
  379. {
  380. + struct elf_arc_link_hash_entry * ret =
  381. + (struct elf_arc_link_hash_entry *) entry;
  382. +
  383. /* Allocate the structure if it has not already been allocated by a
  384. subclass. */
  385. - if (entry == NULL)
  386. - {
  387. - entry = (struct bfd_hash_entry *)
  388. - bfd_hash_allocate (table,
  389. - sizeof (struct elf_arc_link_hash_entry));
  390. - if (entry == NULL)
  391. - return entry;
  392. - }
  393. + if (ret == NULL)
  394. + ret = (struct elf_arc_link_hash_entry *)
  395. + bfd_hash_allocate (table, sizeof (struct elf_arc_link_hash_entry));
  396. + if (ret == NULL)
  397. + return (struct bfd_hash_entry *) ret;
  398. /* Call the allocation method of the superclass. */
  399. - entry = _bfd_elf_link_hash_newfunc (entry, table, string);
  400. - if (entry != NULL)
  401. + ret = ((struct elf_arc_link_hash_entry *)
  402. + _bfd_elf_link_hash_newfunc ((struct bfd_hash_entry *) ret,
  403. + table, string));
  404. + if (ret != NULL)
  405. {
  406. - struct elf_arc_link_hash_entry *eh;
  407. -
  408. - eh = (struct elf_arc_link_hash_entry *) entry;
  409. - eh->dyn_relocs = NULL;
  410. + ret->dyn_relocs = NULL;
  411. + ret->got_ents = NULL;
  412. }
  413. - return entry;
  414. + return (struct bfd_hash_entry *) ret;
  415. }
  416. /* Destroy an ARC ELF linker hash table. */
  417. @@ -352,11 +355,6 @@ arc_elf_link_hash_table_create (bfd *abfd)
  418. return NULL;
  419. }
  420. - ret->elf.init_got_refcount.refcount = 0;
  421. - ret->elf.init_got_refcount.glist = NULL;
  422. - ret->elf.init_got_offset.offset = 0;
  423. - ret->elf.init_got_offset.glist = NULL;
  424. -
  425. ret->elf.root.hash_table_free = elf_arc_link_hash_table_free;
  426. return &ret->elf.root;
  427. @@ -1200,11 +1198,14 @@ arc_special_overflow_checks (const struct arc_relocation_data reloc_data,
  428. + (reloc_data.reloc_offset))))
  429. #define SECTSTART (bfd_signed_vma) (reloc_data.sym_section->output_section->vma \
  430. + reloc_data.sym_section->output_offset)
  431. +#define FINAL_SECTSTART \
  432. + (bfd_signed_vma) (reloc_data.sym_section->output_section->vma)
  433. #define JLI (bfd_signed_vma) (reloc_data.sym_section->output_section->vma)
  434. #define _SDA_BASE_ (bfd_signed_vma) (reloc_data.sdata_begin_symbol_vma)
  435. #define TLS_REL (bfd_signed_vma) \
  436. ((elf_hash_table (info))->tls_sec->output_section->vma)
  437. -#define TLS_TBSS (8)
  438. +#define TLS_TBSS (align_power(TCB_SIZE, \
  439. + reloc_data.sym_section->alignment_power))
  440. #define none (0)
  441. @@ -1615,10 +1616,14 @@ elf_arc_relocate_section (bfd * output_bfd,
  442. while (h->root.type == bfd_link_hash_indirect
  443. || h->root.type == bfd_link_hash_warning)
  444. {
  445. - struct elf_link_hash_entry *h_old = h;
  446. + struct elf_arc_link_hash_entry *ah_old =
  447. + (struct elf_arc_link_hash_entry *) h;
  448. h = (struct elf_link_hash_entry *) h->root.u.i.link;
  449. - if (h->got.glist == 0 && h_old->got.glist != h->got.glist)
  450. - h->got.glist = h_old->got.glist;
  451. + struct elf_arc_link_hash_entry *ah =
  452. + (struct elf_arc_link_hash_entry *) h;
  453. +
  454. + if (ah->got_ents == 0 && ah_old->got_ents != ah->got_ents)
  455. + ah->got_ents = ah_old->got_ents;
  456. }
  457. /* TODO: Need to validate what was the intention. */
  458. @@ -1636,6 +1641,8 @@ elf_arc_relocate_section (bfd * output_bfd,
  459. if (is_reloc_for_GOT (howto) && !bfd_link_pic (info))
  460. {
  461. + struct elf_arc_link_hash_entry *ah =
  462. + (struct elf_arc_link_hash_entry *) h;
  463. /* TODO: Change it to use arc_do_relocation with
  464. ARC_32 reloc. Try to use ADD_RELA macro. */
  465. bfd_vma relocation =
  466. @@ -1645,8 +1652,8 @@ elf_arc_relocate_section (bfd * output_bfd,
  467. + reloc_data.sym_section->output_section->vma)
  468. : 0);
  469. - BFD_ASSERT (h->got.glist);
  470. - bfd_vma got_offset = h->got.glist->offset;
  471. + BFD_ASSERT (ah->got_ents);
  472. + bfd_vma got_offset = ah->got_ents->offset;
  473. bfd_put_32 (output_bfd, relocation,
  474. htab->sgot->contents + got_offset);
  475. }
  476. @@ -1717,7 +1724,7 @@ elf_arc_relocate_section (bfd * output_bfd,
  477. reloc_data.should_relocate = TRUE;
  478. struct got_entry **list
  479. - = get_got_entry_list_for_symbol (output_bfd, r_symndx, h);
  480. + = get_got_entry_list_for_symbol (input_bfd, r_symndx, h);
  481. reloc_data.got_offset_value
  482. = relocate_fix_got_relocs_for_got_info (list,
  483. @@ -1956,40 +1963,45 @@ elf_arc_check_relocs (bfd * abfd,
  484. if (r_symndx < symtab_hdr->sh_info) /* Is a local symbol. */
  485. h = NULL;
  486. else /* Global one. */
  487. - h = sym_hashes[r_symndx - symtab_hdr->sh_info];
  488. + {
  489. + h = sym_hashes[r_symndx - symtab_hdr->sh_info];
  490. + while (h->root.type == bfd_link_hash_indirect
  491. + || h->root.type == bfd_link_hash_warning)
  492. + h = (struct elf_link_hash_entry *) h->root.u.i.link;
  493. + }
  494. +
  495. switch (r_type)
  496. {
  497. - case R_ARC_32:
  498. - case R_ARC_32_ME:
  499. - /* During shared library creation, these relocs should not
  500. - appear in a shared library (as memory will be read only
  501. - and the dynamic linker can not resolve these. However
  502. - the error should not occur for e.g. debugging or
  503. - non-readonly sections. */
  504. - if (h != NULL
  505. - && (bfd_link_dll (info) && !bfd_link_pie (info))
  506. - && (sec->flags & SEC_ALLOC) != 0
  507. - && (sec->flags & SEC_READONLY) != 0
  508. - && ((sec->flags & SEC_CODE) != 0
  509. - || (sec->flags & SEC_DEBUGGING) != 0))
  510. - {
  511. - const char *name;
  512. - if (h)
  513. - name = h->root.root.string;
  514. - else
  515. - /* bfd_elf_sym_name (abfd, symtab_hdr, isym, NULL); */
  516. - name = "UNKNOWN";
  517. - _bfd_error_handler
  518. - /* xgettext:c-format */
  519. - (_("%pB: relocation %s against `%s' can not be used"
  520. - " when making a shared object; recompile with -fPIC"),
  521. - abfd,
  522. - arc_elf_howto (r_type)->name,
  523. - name);
  524. - bfd_set_error (bfd_error_bad_value);
  525. - return FALSE;
  526. - }
  527. + case R_ARC_32:
  528. + case R_ARC_32_ME:
  529. + /* During shared library creation, these relocs should not
  530. + appear in a shared library (as memory will be read only
  531. + and the dynamic linker can not resolve these. However
  532. + the error should not occur for e.g. debugging or
  533. + non-readonly sections. */
  534. + if (h != NULL
  535. + && (bfd_link_dll (info) && !bfd_link_pie (info))
  536. + && (sec->flags & SEC_ALLOC) != 0
  537. + && (sec->flags & SEC_READONLY) != 0
  538. + && ((sec->flags & SEC_CODE) != 0
  539. + || (sec->flags & SEC_DEBUGGING) != 0))
  540. + {
  541. + const char *name;
  542. + if (h)
  543. + name = h->root.root.string;
  544. + else
  545. + name = "UNKNOWN";
  546. + _bfd_error_handler
  547. + /* xgettext:c-format */
  548. + (_("%pB: relocation %s against `%s' can not be used"
  549. + " when making a shared object; recompile with -fPIC"),
  550. + abfd,
  551. + arc_elf_howto (r_type)->name,
  552. + name);
  553. + bfd_set_error (bfd_error_bad_value);
  554. + return FALSE;
  555. + }
  556. /* In some cases we are not setting the 'non_got_ref'
  557. flag, even though the relocations don't require a GOT
  558. @@ -2031,13 +2043,33 @@ elf_arc_check_relocs (bfd * abfd,
  559. if (h == NULL)
  560. continue;
  561. else
  562. - h->needs_plt = 1;
  563. + if (h->forced_local == 0)
  564. + h->needs_plt = 1;
  565. }
  566. /* Add info to the symbol got_entry_list. */
  567. if (is_reloc_for_GOT (howto)
  568. || is_reloc_for_TLS (howto))
  569. {
  570. + if (bfd_link_dll (info) && !bfd_link_pie (info)
  571. + && (r_type == R_ARC_TLS_LE_32 || r_type == R_ARC_TLS_LE_S9))
  572. + {
  573. + const char *name;
  574. + if (h)
  575. + name = h->root.root.string;
  576. + else
  577. + /* bfd_elf_sym_name (abfd, symtab_hdr, isym, NULL); */
  578. + name = "UNKNOWN";
  579. + _bfd_error_handler
  580. + /* xgettext:c-format */
  581. + (_("%pB: relocation %s against `%s' can not be used"
  582. + " when making a shared object; recompile with -fPIC"),
  583. + abfd,
  584. + arc_elf_howto (r_type)->name,
  585. + name);
  586. + bfd_set_error (bfd_error_bad_value);
  587. + return FALSE;
  588. + }
  589. if (! _bfd_elf_create_got_section (dynobj, info))
  590. return FALSE;
  591. @@ -2404,7 +2436,9 @@ elf_arc_finish_dynamic_symbol (bfd * output_bfd,
  592. create respective dynamic relocs. */
  593. /* TODO: Make function to get list and not access the list directly. */
  594. /* TODO: Move function to relocate_section create this relocs eagerly. */
  595. - create_got_dynrelocs_for_got_info (&h->got.glist,
  596. + struct elf_arc_link_hash_entry *ah =
  597. + (struct elf_arc_link_hash_entry *) h;
  598. + create_got_dynrelocs_for_got_info (&ah->got_ents,
  599. output_bfd,
  600. info,
  601. h);
  602. @@ -2413,6 +2447,9 @@ elf_arc_finish_dynamic_symbol (bfd * output_bfd,
  603. {
  604. struct elf_arc_link_hash_table *arc_htab = elf_arc_hash_table (info);
  605. + if (arc_htab == NULL)
  606. + return FALSE;
  607. +
  608. if (h->dynindx == -1
  609. || (h->root.type != bfd_link_hash_defined
  610. && h->root.type != bfd_link_hash_defweak)
  611. @@ -2455,6 +2492,39 @@ elf_arc_finish_dynamic_symbol (bfd * output_bfd,
  612. s = bfd_get_linker_section (dynobj, SECTION); \
  613. break;
  614. +
  615. +struct obfd_info_group {
  616. + bfd *output_bfd;
  617. + struct bfd_link_info *info;
  618. +};
  619. +
  620. +static bfd_boolean
  621. +arc_create_forced_local_got_entries_for_tls (struct bfd_hash_entry *bh,
  622. + void *data)
  623. +{
  624. + struct elf_arc_link_hash_entry * h =
  625. + (struct elf_arc_link_hash_entry *) bh;
  626. + struct obfd_info_group *tmp = (struct obfd_info_group *) data;
  627. +
  628. + if (h->got_ents != NULL)
  629. + {
  630. + BFD_ASSERT (h);
  631. +
  632. + struct got_entry *list = h->got_ents;
  633. +
  634. + while (list != NULL)
  635. + {
  636. + create_got_dynrelocs_for_single_entry (list, tmp->output_bfd,
  637. + tmp->info,
  638. + (struct elf_link_hash_entry *) h);
  639. + list = list->next;
  640. + }
  641. + }
  642. +
  643. + return TRUE;
  644. +}
  645. +
  646. +
  647. /* Function : elf_arc_finish_dynamic_sections
  648. Brief : Finish up the dynamic sections handling.
  649. Args : output_bfd :
  650. @@ -2588,6 +2658,12 @@ elf_arc_finish_dynamic_sections (bfd * output_bfd,
  651. }
  652. }
  653. + struct obfd_info_group group;
  654. + group.output_bfd = output_bfd;
  655. + group.info = info;
  656. + bfd_hash_traverse (&info->hash->table,
  657. + arc_create_forced_local_got_entries_for_tls, &group);
  658. +
  659. return TRUE;
  660. }
  661. diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
  662. index 45d81777eb..746506ef09 100644
  663. --- a/bfd/elf64-ppc.c
  664. +++ b/bfd/elf64-ppc.c
  665. @@ -10810,8 +10810,7 @@ plt_stub_size (struct ppc_link_hash_table *htab,
  666. && htab->params->tls_get_addr_opt)
  667. {
  668. size += 7 * 4;
  669. - if (ALWAYS_EMIT_R2SAVE
  670. - || stub_entry->stub_type == ppc_stub_plt_call_r2save)
  671. + if (stub_entry->stub_type == ppc_stub_plt_call_r2save)
  672. size += 6 * 4;
  673. }
  674. return size;
  675. @@ -10829,7 +10828,7 @@ plt_stub_pad (struct ppc_link_hash_table *htab,
  676. bfd_vma plt_off)
  677. {
  678. int stub_align;
  679. - unsigned stub_size = plt_stub_size (htab, stub_entry, plt_off);
  680. + unsigned stub_size;
  681. bfd_vma stub_off = stub_entry->group->stub_sec->size;
  682. if (htab->params->plt_stub_align >= 0)
  683. @@ -10841,6 +10840,7 @@ plt_stub_pad (struct ppc_link_hash_table *htab,
  684. }
  685. stub_align = 1 << -htab->params->plt_stub_align;
  686. + stub_size = plt_stub_size (htab, stub_entry, plt_off);
  687. if (((stub_off + stub_size - 1) & -stub_align) - (stub_off & -stub_align)
  688. > ((stub_size - 1) & -stub_align))
  689. return stub_align - (stub_off & (stub_align - 1));
  690. @@ -11055,8 +11055,7 @@ build_tls_get_addr_stub (struct ppc_link_hash_table *htab,
  691. bfd_put_32 (obfd, MR_R3_R0, p), p += 4;
  692. if (r != NULL)
  693. r[0].r_offset += 7 * 4;
  694. - if (!ALWAYS_EMIT_R2SAVE
  695. - && stub_entry->stub_type != ppc_stub_plt_call_r2save)
  696. + if (stub_entry->stub_type != ppc_stub_plt_call_r2save)
  697. return build_plt_stub (htab, stub_entry, p, offset, r);
  698. bfd_put_32 (obfd, MFLR_R11, p), p += 4;
  699. @@ -11148,7 +11147,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
  700. struct ppc_link_hash_table *htab;
  701. bfd_byte *loc;
  702. bfd_byte *p;
  703. - bfd_vma dest, off;
  704. + bfd_vma targ, off;
  705. Elf_Internal_Rela *r;
  706. asection *plt;
  707. @@ -11160,8 +11159,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
  708. if (htab == NULL)
  709. return FALSE;
  710. - /* Make a note of the offset within the stubs for this entry. */
  711. - stub_entry->stub_offset = stub_entry->group->stub_sec->size;
  712. + BFD_ASSERT (stub_entry->stub_offset >= stub_entry->group->stub_sec->size);
  713. loc = stub_entry->group->stub_sec->contents + stub_entry->stub_offset;
  714. htab->stub_count[stub_entry->stub_type - 1] += 1;
  715. @@ -11170,16 +11168,16 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
  716. case ppc_stub_long_branch:
  717. case ppc_stub_long_branch_r2off:
  718. /* Branches are relative. This is where we are going to. */
  719. - dest = (stub_entry->target_value
  720. + targ = (stub_entry->target_value
  721. + stub_entry->target_section->output_offset
  722. + stub_entry->target_section->output_section->vma);
  723. - dest += PPC64_LOCAL_ENTRY_OFFSET (stub_entry->other);
  724. - off = dest;
  725. + targ += PPC64_LOCAL_ENTRY_OFFSET (stub_entry->other);
  726. /* And this is where we are coming from. */
  727. - off -= (stub_entry->stub_offset
  728. - + stub_entry->group->stub_sec->output_offset
  729. - + stub_entry->group->stub_sec->output_section->vma);
  730. + off = (stub_entry->stub_offset
  731. + + stub_entry->group->stub_sec->output_offset
  732. + + stub_entry->group->stub_sec->output_section->vma);
  733. + off = targ - off;
  734. p = loc;
  735. if (stub_entry->stub_type == ppc_stub_long_branch_r2off)
  736. @@ -11226,7 +11224,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
  737. return FALSE;
  738. r->r_offset = p - 4 - stub_entry->group->stub_sec->contents;
  739. r->r_info = ELF64_R_INFO (0, R_PPC64_REL24);
  740. - r->r_addend = dest;
  741. + r->r_addend = targ;
  742. if (stub_entry->h != NULL)
  743. {
  744. struct elf_link_hash_entry **hashes;
  745. @@ -11278,13 +11276,13 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
  746. return FALSE;
  747. }
  748. - dest = (stub_entry->target_value
  749. + targ = (stub_entry->target_value
  750. + stub_entry->target_section->output_offset
  751. + stub_entry->target_section->output_section->vma);
  752. if (stub_entry->stub_type != ppc_stub_plt_branch_r2off)
  753. - dest += PPC64_LOCAL_ENTRY_OFFSET (stub_entry->other);
  754. + targ += PPC64_LOCAL_ENTRY_OFFSET (stub_entry->other);
  755. - bfd_put_64 (htab->brlt->owner, dest,
  756. + bfd_put_64 (htab->brlt->owner, targ,
  757. htab->brlt->contents + br_entry->offset);
  758. if (br_entry->iter == htab->stub_iteration)
  759. @@ -11301,7 +11299,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
  760. + htab->brlt->output_offset
  761. + htab->brlt->output_section->vma);
  762. rela.r_info = ELF64_R_INFO (0, R_PPC64_RELATIVE);
  763. - rela.r_addend = dest;
  764. + rela.r_addend = targ;
  765. rl = htab->relbrlt->contents;
  766. rl += (htab->relbrlt->reloc_count++
  767. @@ -11321,17 +11319,17 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
  768. + htab->brlt->output_offset
  769. + htab->brlt->output_section->vma);
  770. r->r_info = ELF64_R_INFO (0, R_PPC64_RELATIVE);
  771. - r->r_addend = dest;
  772. + r->r_addend = targ;
  773. }
  774. }
  775. - dest = (br_entry->offset
  776. + targ = (br_entry->offset
  777. + htab->brlt->output_offset
  778. + htab->brlt->output_section->vma);
  779. - off = (dest
  780. - - elf_gp (info->output_bfd)
  781. - - htab->sec_info[stub_entry->group->link_sec->id].toc_off);
  782. + off = (elf_gp (info->output_bfd)
  783. + + htab->sec_info[stub_entry->group->link_sec->id].toc_off);
  784. + off = targ - off;
  785. if (off + 0x80008000 > 0xffffffff || (off & 7) != 0)
  786. {
  787. @@ -11354,7 +11352,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
  788. if (stub_entry->stub_type == ppc_stub_plt_branch_r2off)
  789. r[0].r_offset += 4;
  790. r[0].r_info = ELF64_R_INFO (0, R_PPC64_TOC16_DS);
  791. - r[0].r_addend = dest;
  792. + r[0].r_addend = targ;
  793. if (PPC_HA (off) != 0)
  794. {
  795. r[0].r_info = ELF64_R_INFO (0, R_PPC64_TOC16_HA);
  796. @@ -11439,8 +11437,8 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
  797. }
  798. /* Now build the stub. */
  799. - dest = stub_entry->plt_ent->plt.offset & ~1;
  800. - if (dest >= (bfd_vma) -2)
  801. + targ = stub_entry->plt_ent->plt.offset & ~1;
  802. + if (targ >= (bfd_vma) -2)
  803. abort ();
  804. plt = htab->elf.splt;
  805. @@ -11453,12 +11451,11 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
  806. else
  807. plt = htab->pltlocal;
  808. }
  809. + targ += plt->output_offset + plt->output_section->vma;
  810. - dest += plt->output_offset + plt->output_section->vma;
  811. -
  812. - off = (dest
  813. - - elf_gp (info->output_bfd)
  814. - - htab->sec_info[stub_entry->group->link_sec->id].toc_off);
  815. + off = (elf_gp (info->output_bfd)
  816. + + htab->sec_info[stub_entry->group->link_sec->id].toc_off);
  817. + off = targ - off;
  818. if (off + 0x80008000 > 0xffffffff || (off & 7) != 0)
  819. {
  820. @@ -11473,15 +11470,6 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
  821. return FALSE;
  822. }
  823. - if (htab->params->plt_stub_align != 0)
  824. - {
  825. - unsigned pad = plt_stub_pad (htab, stub_entry, off);
  826. -
  827. - stub_entry->group->stub_sec->size += pad;
  828. - stub_entry->stub_offset = stub_entry->group->stub_sec->size;
  829. - loc += pad;
  830. - }
  831. -
  832. r = NULL;
  833. if (info->emitrelocations)
  834. {
  835. @@ -11496,7 +11484,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
  836. r[0].r_offset = loc - stub_entry->group->stub_sec->contents;
  837. if (bfd_big_endian (info->output_bfd))
  838. r[0].r_offset += 2;
  839. - r[0].r_addend = dest;
  840. + r[0].r_addend = targ;
  841. }
  842. if (stub_entry->h != NULL
  843. && (stub_entry->h == htab->tls_get_addr_fd
  844. @@ -11515,7 +11503,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
  845. return FALSE;
  846. }
  847. - stub_entry->group->stub_sec->size += p - loc;
  848. + stub_entry->group->stub_sec->size = stub_entry->stub_offset + (p - loc);
  849. if (htab->params->emit_stub_syms)
  850. {
  851. @@ -11567,7 +11555,7 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
  852. struct ppc_stub_hash_entry *stub_entry;
  853. struct bfd_link_info *info;
  854. struct ppc_link_hash_table *htab;
  855. - bfd_vma off;
  856. + bfd_vma targ, off;
  857. int size;
  858. /* Massage our args to the form they really have. */
  859. @@ -11578,6 +11566,9 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
  860. if (htab == NULL)
  861. return FALSE;
  862. + /* Make a note of the offset within the stubs for this entry. */
  863. + stub_entry->stub_offset = stub_entry->group->stub_sec->size;
  864. +
  865. if (stub_entry->h != NULL
  866. && stub_entry->h->save_res
  867. && stub_entry->h->elf.root.type == bfd_link_hash_defined
  868. @@ -11594,8 +11585,8 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
  869. || stub_entry->stub_type == ppc_stub_plt_call_r2save)
  870. {
  871. asection *plt;
  872. - off = stub_entry->plt_ent->plt.offset & ~(bfd_vma) 1;
  873. - if (off >= (bfd_vma) -2)
  874. + targ = stub_entry->plt_ent->plt.offset & ~(bfd_vma) 1;
  875. + if (targ >= (bfd_vma) -2)
  876. abort ();
  877. plt = htab->elf.splt;
  878. if (!htab->elf.dynamic_sections_created
  879. @@ -11607,23 +11598,30 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
  880. else
  881. plt = htab->pltlocal;
  882. }
  883. - off += (plt->output_offset
  884. - + plt->output_section->vma
  885. - - elf_gp (info->output_bfd)
  886. - - htab->sec_info[stub_entry->group->link_sec->id].toc_off);
  887. + targ += plt->output_offset + plt->output_section->vma;
  888. +
  889. + off = (elf_gp (info->output_bfd)
  890. + + htab->sec_info[stub_entry->group->link_sec->id].toc_off);
  891. + off = targ - off;
  892. +
  893. + if (htab->params->plt_stub_align != 0)
  894. + {
  895. + unsigned pad = plt_stub_pad (htab, stub_entry, off);
  896. +
  897. + stub_entry->group->stub_sec->size += pad;
  898. + stub_entry->stub_offset = stub_entry->group->stub_sec->size;
  899. + }
  900. size = plt_stub_size (htab, stub_entry, off);
  901. +
  902. if (stub_entry->h != NULL
  903. && (stub_entry->h == htab->tls_get_addr_fd
  904. || stub_entry->h == htab->tls_get_addr)
  905. && htab->params->tls_get_addr_opt
  906. - && (ALWAYS_EMIT_R2SAVE
  907. - || stub_entry->stub_type == ppc_stub_plt_call_r2save))
  908. + && stub_entry->stub_type == ppc_stub_plt_call_r2save)
  909. stub_entry->group->tls_get_addr_opt_bctrl
  910. - = stub_entry->group->stub_sec->size + size - 5 * 4;
  911. + = stub_entry->stub_offset + size - 5 * 4;
  912. - if (htab->params->plt_stub_align)
  913. - size += plt_stub_pad (htab, stub_entry, off);
  914. if (info->emitrelocations)
  915. {
  916. stub_entry->group->stub_sec->reloc_count
  917. @@ -11642,12 +11640,12 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
  918. bfd_vma r2off = 0;
  919. bfd_vma local_off = 0;
  920. - off = (stub_entry->target_value
  921. - + stub_entry->target_section->output_offset
  922. - + stub_entry->target_section->output_section->vma);
  923. - off -= (stub_entry->group->stub_sec->size
  924. - + stub_entry->group->stub_sec->output_offset
  925. - + stub_entry->group->stub_sec->output_section->vma);
  926. + targ = (stub_entry->target_value
  927. + + stub_entry->target_section->output_offset
  928. + + stub_entry->target_section->output_section->vma);
  929. + off = (stub_entry->stub_offset
  930. + + stub_entry->group->stub_sec->output_offset
  931. + + stub_entry->group->stub_sec->output_section->vma);
  932. /* Reset the stub type from the plt variant in case we now
  933. can reach with a shorter stub. */
  934. @@ -11668,8 +11666,9 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
  935. size += 4;
  936. if (PPC_LO (r2off) != 0)
  937. size += 4;
  938. - off -= size - 4;
  939. + off += size - 4;
  940. }
  941. + off = targ - off;
  942. local_off = PPC64_LOCAL_ENTRY_OFFSET (stub_entry->other);
  943. @@ -11709,11 +11708,12 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
  944. }
  945. stub_entry->stub_type += ppc_stub_plt_branch - ppc_stub_long_branch;
  946. - off = (br_entry->offset
  947. - + htab->brlt->output_offset
  948. - + htab->brlt->output_section->vma
  949. - - elf_gp (info->output_bfd)
  950. - - htab->sec_info[stub_entry->group->link_sec->id].toc_off);
  951. + targ = (br_entry->offset
  952. + + htab->brlt->output_offset
  953. + + htab->brlt->output_section->vma);
  954. + off = (elf_gp (info->output_bfd)
  955. + + htab->sec_info[stub_entry->group->link_sec->id].toc_off);
  956. + off = targ - off;
  957. if (info->emitrelocations)
  958. {
  959. @@ -13530,7 +13530,8 @@ write_plt_relocs_for_local_syms (struct bfd_link_info *info)
  960. }
  961. val = sym->st_value + ent->addend;
  962. - val += PPC64_LOCAL_ENTRY_OFFSET (sym->st_other);
  963. + if (ELF_ST_TYPE (sym->st_info) != STT_GNU_IFUNC)
  964. + val += PPC64_LOCAL_ENTRY_OFFSET (sym->st_other);
  965. if (sym_sec != NULL && sym_sec->output_section != NULL)
  966. val += sym_sec->output_offset + sym_sec->output_section->vma;
  967. @@ -14877,10 +14878,13 @@ ppc64_elf_relocate_section (bfd *output_bfd,
  968. addend = 0;
  969. reloc_dest = DEST_STUB;
  970. - if ((stub_entry->stub_type == ppc_stub_plt_call
  971. + if (((stub_entry->stub_type == ppc_stub_plt_call
  972. + && ALWAYS_EMIT_R2SAVE)
  973. || stub_entry->stub_type == ppc_stub_plt_call_r2save)
  974. - && (ALWAYS_EMIT_R2SAVE
  975. - || stub_entry->stub_type == ppc_stub_plt_call_r2save)
  976. + && !(h != NULL
  977. + && (h == htab->tls_get_addr_fd
  978. + || h == htab->tls_get_addr)
  979. + && htab->params->tls_get_addr_opt)
  980. && rel + 1 < relend
  981. && rel[1].r_offset == rel->r_offset + 4
  982. && ELF64_R_TYPE (rel[1].r_info) == R_PPC64_TOCSAVE)
  983. diff --git a/bfd/elflink.c b/bfd/elflink.c
  984. index b24fb95848..46091b6341 100644
  985. --- a/bfd/elflink.c
  986. +++ b/bfd/elflink.c
  987. @@ -686,13 +686,11 @@ bfd_elf_record_link_assignment (bfd *output_bfd,
  988. && !h->def_regular)
  989. h->root.type = bfd_link_hash_undefined;
  990. - /* If this symbol is not being provided by the linker script, and it is
  991. - currently defined by a dynamic object, but not by a regular object,
  992. - then clear out any version information because the symbol will not be
  993. - associated with the dynamic object any more. */
  994. - if (!provide
  995. - && h->def_dynamic
  996. - && !h->def_regular)
  997. + /* If this symbol is currently defined by a dynamic object, but not
  998. + by a regular object, then clear out any version information because
  999. + the symbol will not be associated with the dynamic object any
  1000. + more. */
  1001. + if (h->def_dynamic && !h->def_regular)
  1002. h->verinfo.verdef = NULL;
  1003. /* Make sure this symbol is not garbage collected. */
  1004. @@ -2360,10 +2358,19 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data)
  1005. return FALSE;
  1006. }
  1007. + bed = get_elf_backend_data (info->output_bfd);
  1008. +
  1009. /* We only need version numbers for symbols defined in regular
  1010. objects. */
  1011. if (!h->def_regular)
  1012. - return TRUE;
  1013. + {
  1014. + /* Hide symbols defined in discarded input sections. */
  1015. + if ((h->root.type == bfd_link_hash_defined
  1016. + || h->root.type == bfd_link_hash_defweak)
  1017. + && discarded_section (h->root.u.def.section))
  1018. + (*bed->elf_backend_hide_symbol) (info, h, TRUE);
  1019. + return TRUE;
  1020. + }
  1021. hide = FALSE;
  1022. bed = get_elf_backend_data (info->output_bfd);
  1023. diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
  1024. index cf321f32c2..d4964b1b11 100644
  1025. --- a/bfd/elfnn-aarch64.c
  1026. +++ b/bfd/elfnn-aarch64.c
  1027. @@ -3845,7 +3845,7 @@ _bfd_aarch64_erratum_835769_scan (bfd *input_bfd,
  1028. static bfd_boolean
  1029. _bfd_aarch64_adrp_p (uint32_t insn)
  1030. {
  1031. - return ((insn & 0x9f000000) == 0x90000000);
  1032. + return ((insn & AARCH64_ADRP_OP_MASK) == AARCH64_ADRP_OP);
  1033. }
  1034. @@ -5074,7 +5074,7 @@ _bfd_aarch64_erratum_843419_branch_to_stub (struct bfd_hash_entry *gen_entry,
  1035. + stub_entry->adrp_offset);
  1036. insn = bfd_getl32 (contents + stub_entry->adrp_offset);
  1037. - if ((insn & AARCH64_ADRP_OP_MASK) != AARCH64_ADRP_OP)
  1038. + if (!_bfd_aarch64_adrp_p (insn))
  1039. abort ();
  1040. bfd_signed_vma imm =
  1041. @@ -5939,6 +5939,64 @@ bad_ifunc_reloc:
  1042. # define movz_hw_R0 (0x52c00000)
  1043. #endif
  1044. +/* Structure to hold payload for _bfd_aarch64_erratum_843419_clear_stub,
  1045. + it is used to identify the stub information to reset. */
  1046. +
  1047. +struct erratum_843419_branch_to_stub_clear_data
  1048. +{
  1049. + bfd_vma adrp_offset;
  1050. + asection *output_section;
  1051. +};
  1052. +
  1053. +/* Clear the erratum information for GEN_ENTRY if the ADRP_OFFSET and
  1054. + section inside IN_ARG matches. The clearing is done by setting the
  1055. + stub_type to none. */
  1056. +
  1057. +static bfd_boolean
  1058. +_bfd_aarch64_erratum_843419_clear_stub (struct bfd_hash_entry *gen_entry,
  1059. + void *in_arg)
  1060. +{
  1061. + struct elf_aarch64_stub_hash_entry *stub_entry
  1062. + = (struct elf_aarch64_stub_hash_entry *) gen_entry;
  1063. + struct erratum_843419_branch_to_stub_clear_data *data
  1064. + = (struct erratum_843419_branch_to_stub_clear_data *) in_arg;
  1065. +
  1066. + if (stub_entry->target_section != data->output_section
  1067. + || stub_entry->stub_type != aarch64_stub_erratum_843419_veneer
  1068. + || stub_entry->adrp_offset != data->adrp_offset)
  1069. + return TRUE;
  1070. +
  1071. + /* Change the stub type instead of removing the entry, removing from the hash
  1072. + table would be slower and we have already reserved the memory for the entry
  1073. + so there wouldn't be much gain. Changing the stub also keeps around a
  1074. + record of what was there before. */
  1075. + stub_entry->stub_type = aarch64_stub_none;
  1076. +
  1077. + /* We're done and there could have been only one matching stub at that
  1078. + particular offset, so abort further traversal. */
  1079. + return FALSE;
  1080. +}
  1081. +
  1082. +/* TLS Relaxations may relax an adrp sequence that matches the erratum 843419
  1083. + sequence. In this case the erratum no longer applies and we need to remove
  1084. + the entry from the pending stub generation. This clears matching adrp insn
  1085. + at ADRP_OFFSET in INPUT_SECTION in the stub table defined in GLOBALS. */
  1086. +
  1087. +static void
  1088. +clear_erratum_843419_entry (struct elf_aarch64_link_hash_table *globals,
  1089. + bfd_vma adrp_offset, asection *input_section)
  1090. +{
  1091. + if (globals->fix_erratum_843419)
  1092. + {
  1093. + struct erratum_843419_branch_to_stub_clear_data data;
  1094. + data.adrp_offset = adrp_offset;
  1095. + data.output_section = input_section;
  1096. +
  1097. + bfd_hash_traverse (&globals->stub_hash_table,
  1098. + _bfd_aarch64_erratum_843419_clear_stub, &data);
  1099. + }
  1100. +}
  1101. +
  1102. /* Handle TLS relaxations. Relaxing is possible for symbols that use
  1103. R_AARCH64_TLSDESC_ADR_{PAGE, LD64_LO12_NC, ADD_LO12_NC} during a static
  1104. link.
  1105. @@ -5949,8 +6007,9 @@ bad_ifunc_reloc:
  1106. static bfd_reloc_status_type
  1107. elfNN_aarch64_tls_relax (struct elf_aarch64_link_hash_table *globals,
  1108. - bfd *input_bfd, bfd_byte *contents,
  1109. - Elf_Internal_Rela *rel, struct elf_link_hash_entry *h)
  1110. + bfd *input_bfd, asection *input_section,
  1111. + bfd_byte *contents, Elf_Internal_Rela *rel,
  1112. + struct elf_link_hash_entry *h)
  1113. {
  1114. bfd_boolean is_local = h == NULL;
  1115. unsigned int r_type = ELFNN_R_TYPE (rel->r_info);
  1116. @@ -5971,6 +6030,9 @@ elfNN_aarch64_tls_relax (struct elf_aarch64_link_hash_table *globals,
  1117. Where R is x for LP64, and w for ILP32. */
  1118. bfd_putl32 (movz_R0, contents + rel->r_offset);
  1119. + /* We have relaxed the adrp into a mov, we may have to clear any
  1120. + pending erratum fixes. */
  1121. + clear_erratum_843419_entry (globals, rel->r_offset, input_section);
  1122. return bfd_reloc_continue;
  1123. }
  1124. else
  1125. @@ -6261,6 +6323,9 @@ elfNN_aarch64_tls_relax (struct elf_aarch64_link_hash_table *globals,
  1126. {
  1127. insn = bfd_getl32 (contents + rel->r_offset);
  1128. bfd_putl32 (movz_R0 | (insn & 0x1f), contents + rel->r_offset);
  1129. + /* We have relaxed the adrp into a mov, we may have to clear any
  1130. + pending erratum fixes. */
  1131. + clear_erratum_843419_entry (globals, rel->r_offset, input_section);
  1132. }
  1133. return bfd_reloc_continue;
  1134. @@ -6485,7 +6550,8 @@ elfNN_aarch64_relocate_section (bfd *output_bfd,
  1135. howto = elfNN_aarch64_howto_from_bfd_reloc (bfd_r_type);
  1136. BFD_ASSERT (howto != NULL);
  1137. r_type = howto->type;
  1138. - r = elfNN_aarch64_tls_relax (globals, input_bfd, contents, rel, h);
  1139. + r = elfNN_aarch64_tls_relax (globals, input_bfd, input_section,
  1140. + contents, rel, h);
  1141. unresolved_reloc = 0;
  1142. }
  1143. else
  1144. @@ -8076,6 +8142,8 @@ aarch64_map_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
  1145. if (!elfNN_aarch64_output_map_sym (osi, AARCH64_MAP_INSN, addr))
  1146. return FALSE;
  1147. break;
  1148. + case aarch64_stub_none:
  1149. + break;
  1150. default:
  1151. abort ();
  1152. diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c
  1153. index a2497aab86..2d8f7b640b 100644
  1154. --- a/bfd/elfxx-x86.c
  1155. +++ b/bfd/elfxx-x86.c
  1156. @@ -2407,12 +2407,27 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info,
  1157. switch (pr_type)
  1158. {
  1159. case GNU_PROPERTY_X86_ISA_1_USED:
  1160. + if (aprop == NULL || bprop == NULL)
  1161. + {
  1162. + /* Only one of APROP and BPROP can be NULL. */
  1163. + if (aprop != NULL)
  1164. + {
  1165. + /* Remove this property since the other input file doesn't
  1166. + have it. */
  1167. + aprop->pr_kind = property_remove;
  1168. + updated = TRUE;
  1169. + }
  1170. + break;
  1171. + }
  1172. + goto or_property;
  1173. +
  1174. case GNU_PROPERTY_X86_ISA_1_NEEDED:
  1175. if (aprop != NULL && bprop != NULL)
  1176. {
  1177. +or_property:
  1178. number = aprop->u.number;
  1179. aprop->u.number = number | bprop->u.number;
  1180. - /* Remove the property if ISA bits are empty. */
  1181. + /* Remove the property if all bits are empty. */
  1182. if (aprop->u.number == 0)
  1183. {
  1184. aprop->pr_kind = property_remove;
  1185. @@ -2428,14 +2443,14 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info,
  1186. {
  1187. if (aprop->u.number == 0)
  1188. {
  1189. - /* Remove APROP if ISA bits are empty. */
  1190. + /* Remove APROP if all bits are empty. */
  1191. aprop->pr_kind = property_remove;
  1192. updated = TRUE;
  1193. }
  1194. }
  1195. else
  1196. {
  1197. - /* Return TRUE if APROP is NULL and ISA bits of BPROP
  1198. + /* Return TRUE if APROP is NULL and all bits of BPROP
  1199. aren't empty to indicate that BPROP should be added
  1200. to ABFD. */
  1201. updated = bprop->u.number != 0;
  1202. @@ -2524,6 +2539,7 @@ _bfd_x86_elf_link_setup_gnu_properties
  1203. const struct elf_backend_data *bed;
  1204. unsigned int class_align = ABI_64_P (info->output_bfd) ? 3 : 2;
  1205. unsigned int got_align;
  1206. + bfd_boolean has_text = FALSE;
  1207. features = 0;
  1208. if (info->ibt)
  1209. @@ -2538,24 +2554,75 @@ _bfd_x86_elf_link_setup_gnu_properties
  1210. if (bfd_get_flavour (pbfd) == bfd_target_elf_flavour
  1211. && bfd_count_sections (pbfd) != 0)
  1212. {
  1213. + if (!has_text)
  1214. + {
  1215. + /* Check if there is no non-empty text section. */
  1216. + sec = bfd_get_section_by_name (pbfd, ".text");
  1217. + if (sec != NULL && sec->size != 0)
  1218. + has_text = TRUE;
  1219. + }
  1220. +
  1221. ebfd = pbfd;
  1222. if (elf_properties (pbfd) != NULL)
  1223. break;
  1224. }
  1225. - if (ebfd != NULL && features)
  1226. + bed = get_elf_backend_data (info->output_bfd);
  1227. +
  1228. + htab = elf_x86_hash_table (info, bed->target_id);
  1229. + if (htab == NULL)
  1230. + return pbfd;
  1231. +
  1232. + if (ebfd != NULL)
  1233. {
  1234. - /* If features is set, add GNU_PROPERTY_X86_FEATURE_1_IBT and
  1235. - GNU_PROPERTY_X86_FEATURE_1_SHSTK. */
  1236. - prop = _bfd_elf_get_property (ebfd,
  1237. - GNU_PROPERTY_X86_FEATURE_1_AND,
  1238. - 4);
  1239. - prop->u.number |= features;
  1240. - prop->pr_kind = property_number;
  1241. + prop = NULL;
  1242. + if (features)
  1243. + {
  1244. + /* If features is set, add GNU_PROPERTY_X86_FEATURE_1_IBT and
  1245. + GNU_PROPERTY_X86_FEATURE_1_SHSTK. */
  1246. + prop = _bfd_elf_get_property (ebfd,
  1247. + GNU_PROPERTY_X86_FEATURE_1_AND,
  1248. + 4);
  1249. + prop->u.number |= features;
  1250. + prop->pr_kind = property_number;
  1251. + }
  1252. + else if (has_text
  1253. + && elf_tdata (info->output_bfd)->o->build_id.sec == NULL
  1254. + && !htab->elf.dynamic_sections_created
  1255. + && !info->traditional_format
  1256. + && (info->output_bfd->flags & D_PAGED) != 0
  1257. + && info->separate_code)
  1258. + {
  1259. + /* If the separate code program header is needed, make sure
  1260. + that the first read-only PT_LOAD segment has no code by
  1261. + adding a GNU_PROPERTY_X86_ISA_1_NEEDED note. */
  1262. + elf_property_list *list;
  1263. + bfd_boolean need_property = TRUE;
  1264. +
  1265. + for (list = elf_properties (ebfd); list; list = list->next)
  1266. + switch (list->property.pr_type)
  1267. + {
  1268. + case GNU_PROPERTY_STACK_SIZE:
  1269. + case GNU_PROPERTY_NO_COPY_ON_PROTECTED:
  1270. + case GNU_PROPERTY_X86_ISA_1_NEEDED:
  1271. + /* These properties won't be removed during merging. */
  1272. + need_property = FALSE;
  1273. + break;
  1274. + }
  1275. +
  1276. + if (need_property)
  1277. + {
  1278. + prop = _bfd_elf_get_property (ebfd,
  1279. + GNU_PROPERTY_X86_ISA_1_NEEDED,
  1280. + 4);
  1281. + prop->u.number = GNU_PROPERTY_X86_ISA_1_486;
  1282. + prop->pr_kind = property_number;
  1283. + }
  1284. + }
  1285. /* Create the GNU property note section if needed. */
  1286. - if (pbfd == NULL)
  1287. + if (prop != NULL && pbfd == NULL)
  1288. {
  1289. sec = bfd_make_section_with_flags (ebfd,
  1290. NOTE_GNU_PROPERTY_SECTION_NAME,
  1291. @@ -2581,12 +2648,6 @@ error_alignment:
  1292. pbfd = _bfd_elf_link_setup_gnu_properties (info);
  1293. - bed = get_elf_backend_data (info->output_bfd);
  1294. -
  1295. - htab = elf_x86_hash_table (info, bed->target_id);
  1296. - if (htab == NULL)
  1297. - return pbfd;
  1298. -
  1299. htab->r_info = init_table->r_info;
  1300. htab->r_sym = init_table->r_sym;
  1301. diff --git a/bfd/version.h b/bfd/version.h
  1302. index 222d2e62c3..333881dcd9 100644
  1303. --- a/bfd/version.h
  1304. +++ b/bfd/version.h
  1305. @@ -16,7 +16,7 @@
  1306. In releases, the date is not included in either version strings or
  1307. sonames. */
  1308. -#define BFD_VERSION_DATE 20180718
  1309. +#define BFD_VERSION_DATE 20181130
  1310. #define BFD_VERSION @bfd_version@
  1311. #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
  1312. #define REPORT_BUGS_TO @report_bugs_to@
  1313. diff --git a/binutils/ChangeLog b/binutils/ChangeLog
  1314. index 32f47d5e07..6ef8592ff2 100644
  1315. --- a/binutils/ChangeLog
  1316. +++ b/binutils/ChangeLog
  1317. @@ -1,3 +1,9 @@
  1318. +2018-09-12 H.J. Lu <hongjiu.lu@intel.com>
  1319. +
  1320. + PR ld/23499
  1321. + * readelf.c (get_symbol_version_string): Return _("<corrupt>")
  1322. + for corrupt symbol version info.
  1323. +
  1324. 2018-07-18 Nick Clifton <nickc@redhat.com>
  1325. 2.31.1 Release point.
  1326. diff --git a/binutils/readelf.c b/binutils/readelf.c
  1327. index 1b50ba7631..f4df697a7d 100644
  1328. --- a/binutils/readelf.c
  1329. +++ b/binutils/readelf.c
  1330. @@ -11252,6 +11252,7 @@ get_symbol_version_string (Filedata * filedata,
  1331. unsigned char data[2];
  1332. unsigned short vers_data;
  1333. unsigned long offset;
  1334. + unsigned short max_vd_ndx;
  1335. if (!is_dynsym
  1336. || version_info[DT_VERSIONTAGIDX (DT_VERSYM)] == 0)
  1337. @@ -11269,6 +11270,8 @@ get_symbol_version_string (Filedata * filedata,
  1338. if ((vers_data & VERSYM_HIDDEN) == 0 && vers_data == 0)
  1339. return NULL;
  1340. + max_vd_ndx = 0;
  1341. +
  1342. /* Usually we'd only see verdef for defined symbols, and verneed for
  1343. undefined symbols. However, symbols defined by the linker in
  1344. .dynbss for variables copied from a shared library in order to
  1345. @@ -11311,6 +11314,9 @@ get_symbol_version_string (Filedata * filedata,
  1346. ivd.vd_flags = BYTE_GET (evd.vd_flags);
  1347. }
  1348. + if ((ivd.vd_ndx & VERSYM_VERSION) > max_vd_ndx)
  1349. + max_vd_ndx = ivd.vd_ndx & VERSYM_VERSION;
  1350. +
  1351. off += ivd.vd_next;
  1352. }
  1353. while (ivd.vd_ndx != (vers_data & VERSYM_VERSION) && ivd.vd_next != 0);
  1354. @@ -11402,6 +11408,9 @@ get_symbol_version_string (Filedata * filedata,
  1355. return (ivna.vna_name < strtab_size
  1356. ? strtab + ivna.vna_name : _("<corrupt>"));
  1357. }
  1358. + else if ((max_vd_ndx || (vers_data & VERSYM_VERSION) != 1)
  1359. + && (vers_data & VERSYM_VERSION) > max_vd_ndx)
  1360. + return _("<corrupt>");
  1361. }
  1362. return NULL;
  1363. }
  1364. diff --git a/gas/ChangeLog b/gas/ChangeLog
  1365. index bb4541900d..67e9327ed2 100644
  1366. --- a/gas/ChangeLog
  1367. +++ b/gas/ChangeLog
  1368. @@ -1,3 +1,82 @@
  1369. +2018-11-05 H.J. Lu <hongjiu.lu@intel.com>
  1370. +
  1371. + PR gas/23854
  1372. + * config/tc-i386.c (output_disp): Disable GOT relaxation with
  1373. + data prefix.
  1374. + * testsuite/gas/i386/mixed-mode-reloc32.d: Updated.
  1375. +
  1376. +2018-10-19 Tamar Christina <tamar.christina@arm.com>
  1377. +
  1378. + * testsuite/gas/arm/undefined-insn-arm.d: Widen pe skip.
  1379. + * testsuite/gas/arm/undefined-insn-thumb.d: Likewise.
  1380. +
  1381. +2018-10-19 Tamar Christina <tamar.christina@arm.com>
  1382. +
  1383. + * testsuite/gas/arm/undefined-insn-arm.d: New test.
  1384. + * testsuite/gas/arm/undefined-insn-thumb.d: New test.
  1385. + * testsuite/gas/arm/undefined-insn.s: New test.
  1386. +
  1387. +2018-10-16 Matthew Malcomson <matthew.malcomson@arm.com>
  1388. +
  1389. + * testsuite/gas/aarch64/illegal-dotproduct.d: New test.
  1390. + * testsuite/gas/aarch64/illegal-dotproduct.l: New test.
  1391. + * testsuite/gas/aarch64/illegal-dotproduct.s: New test.
  1392. +
  1393. +2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
  1394. +
  1395. + * testsuite/gas/i386/se1.s: Add enclv.
  1396. + * testsuite/gas/i386/x86-64-se1.s: Likewise.
  1397. + * testsuite/gas/i386/se1.d: Updated.
  1398. + * testsuite/gas/i386/x86-64-se1.d: Likewise.
  1399. +
  1400. +2018-09-18 Tamar Christina <tamar.christina@arm.com>
  1401. +
  1402. + * config/tc-aarch64.c (output_operand_error_report): Apply filtering to
  1403. + current instead of head message.
  1404. +
  1405. +2018-09-17 Nick Clifton <nickc@redhat.com>
  1406. +
  1407. + backport from mainline:
  1408. + * 2018-08-14 Robert Yang <liezhi.yang@windriver.com>
  1409. +
  1410. + * as.c (main): Improve check for input file matching output file.
  1411. +
  1412. +2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
  1413. +
  1414. + * testsuite/gas/i386/evex-no-scale.s: Removed.
  1415. + * testsuite/gas/i386/evex-no-scale-32.d: Don't use
  1416. + evex-no-scale.s.
  1417. + * testsuite/gas/i386/evex-no-scale-64.d: Likewise.
  1418. + * testsuite/gas/i386/evex-no-scale-32.s: New file.
  1419. + * testsuite/gas/i386/evex-no-scale-64.s: Likewise.
  1420. +
  1421. +2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
  1422. +
  1423. + * testsuite/gas/i386/i386.exp: Run evex-no-scale-32 and
  1424. + evex-no-scale-64 only for ELF targets.
  1425. +
  1426. +2018-07-31 Jan Beulich <jbeulich@suse.com>
  1427. +
  1428. + PR gas/23465
  1429. + * config/tc-i386.c (output_disp): Restrict scaling.
  1430. + * testsuite/gas/i386/evex-no-scale.s,
  1431. + testsuite/gas/i386/evex-no-scale-32.d
  1432. + testsuite/gas/i386/evex-no-scale-64.d: New.
  1433. + * testsuite/gas/i386/i386.exp: Run new tests.
  1434. +
  1435. +2018-07-30 John David Anglin <danglin@gcc.gnu.org>
  1436. +
  1437. + * config/tc-hppa.c: Include "struc-symbol.h".
  1438. + (pa_build_unwind_subspace): Use call_info->start_symbol->sy_frag
  1439. + instead of frag_now for local symbol replacement.
  1440. +
  1441. +2018-07-18 H.J. Lu <hongjiu.lu@intel.com>
  1442. +
  1443. + PR gas/23418
  1444. + * testsuite/gas/i386/xmmword.s: Add tests for vcvtps2qq,
  1445. + vcvtps2uqq, vcvttps2qq and vcvttps2uqq.
  1446. + * testsuite/gas/i386/xmmword.l: Updated.
  1447. +
  1448. 2018-07-18 Nick Clifton <nickc@redhat.com>
  1449. 2.31.1 Release point.
  1450. diff --git a/gas/as.c b/gas/as.c
  1451. index 02c7d2970b..919c24a24a 100644
  1452. --- a/gas/as.c
  1453. +++ b/gas/as.c
  1454. @@ -1254,14 +1254,27 @@ main (int argc, char ** argv)
  1455. {
  1456. struct stat sib;
  1457. - if (stat (argv[i], &sib) == 0)
  1458. + /* Check that the input file and output file are different. */
  1459. + if (stat (argv[i], &sib) == 0
  1460. + && sib.st_ino == sob.st_ino
  1461. + /* POSIX emulating systems may support stat() but if the
  1462. + underlying file system does not support a file serial number
  1463. + of some kind then they will return 0 for the inode. So
  1464. + two files with an inode of 0 may not actually be the same.
  1465. + On real POSIX systems no ordinary file will ever have an
  1466. + inode of 0. */
  1467. + && sib.st_ino != 0
  1468. + /* Different files may have the same inode number if they
  1469. + reside on different devices, so check the st_dev field as
  1470. + well. */
  1471. + && sib.st_dev == sob.st_dev)
  1472. {
  1473. - if (sib.st_ino == sob.st_ino && sib.st_ino != 0)
  1474. - {
  1475. - /* Don't let as_fatal remove the output file! */
  1476. - out_file_name = NULL;
  1477. - as_fatal (_("The input and output files must be distinct"));
  1478. - }
  1479. + const char *saved_out_file_name = out_file_name;
  1480. +
  1481. + /* Don't let as_fatal remove the output file! */
  1482. + out_file_name = NULL;
  1483. + as_fatal (_("The input '%s' and output '%s' files are the same"),
  1484. + argv[i], saved_out_file_name);
  1485. }
  1486. }
  1487. }
  1488. diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
  1489. index 31985963e3..c77de21d19 100644
  1490. --- a/gas/config/tc-aarch64.c
  1491. +++ b/gas/config/tc-aarch64.c
  1492. @@ -4809,7 +4809,7 @@ output_operand_error_report (char *str, bfd_boolean non_fatal_only)
  1493. /* If we don't want to print non-fatal errors then don't consider them
  1494. at all. */
  1495. if (curr->detail.kind != kind
  1496. - || (non_fatal_only && !head->detail.non_fatal))
  1497. + || (non_fatal_only && !curr->detail.non_fatal))
  1498. continue;
  1499. /* If there are multiple errors, pick up the one with the highest
  1500. mismatching operand index. In the case of multiple errors with
  1501. diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c
  1502. index e69fdb2b39..ccae68cb40 100644
  1503. --- a/gas/config/tc-hppa.c
  1504. +++ b/gas/config/tc-hppa.c
  1505. @@ -23,6 +23,7 @@
  1506. #include "as.h"
  1507. #include "safe-ctype.h"
  1508. +#include "struc-symbol.h"
  1509. #include "subsegs.h"
  1510. #include "dw2gencfi.h"
  1511. @@ -5989,7 +5990,8 @@ pa_build_unwind_subspace (struct call_info *call_info)
  1512. else
  1513. {
  1514. symbolP = symbol_new (name, now_seg,
  1515. - S_GET_VALUE (call_info->start_symbol), frag_now);
  1516. + S_GET_VALUE (call_info->start_symbol),
  1517. + call_info->start_symbol->sy_frag);
  1518. gas_assert (symbolP);
  1519. S_CLEAR_EXTERNAL (symbolP);
  1520. symbol_table_insert (symbolP);
  1521. diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
  1522. index 2d20f1cae9..a288a31844 100644
  1523. --- a/gas/config/tc-i386.c
  1524. +++ b/gas/config/tc-i386.c
  1525. @@ -7857,7 +7857,8 @@ output_disp (fragS *insn_start_frag, offsetT insn_start_off)
  1526. int size = disp_size (n);
  1527. offsetT val = i.op[n].disps->X_add_number;
  1528. - val = offset_in_range (val >> i.memshift, size);
  1529. + val = offset_in_range (val >> (size == 1 ? i.memshift : 0),
  1530. + size);
  1531. p = frag_more (size);
  1532. md_number_to_chars (p, val, size);
  1533. }
  1534. @@ -7942,12 +7943,13 @@ output_disp (fragS *insn_start_frag, offsetT insn_start_off)
  1535. /* Check for "call/jmp *mem", "mov mem, %reg",
  1536. "test %reg, mem" and "binop mem, %reg" where binop
  1537. is one of adc, add, and, cmp, or, sbb, sub, xor
  1538. - instructions. Always generate R_386_GOT32X for
  1539. - "sym*GOT" operand in 32-bit mode. */
  1540. - if ((generate_relax_relocations
  1541. - || (!object_64bit
  1542. - && i.rm.mode == 0
  1543. - && i.rm.regmem == 5))
  1544. + instructions without data prefix. Always generate
  1545. + R_386_GOT32X for "sym*GOT" operand in 32-bit mode. */
  1546. + if (i.prefix[DATA_PREFIX] == 0
  1547. + && (generate_relax_relocations
  1548. + || (!object_64bit
  1549. + && i.rm.mode == 0
  1550. + && i.rm.regmem == 5))
  1551. && (i.rm.mode == 2
  1552. || (i.rm.mode == 0 && i.rm.regmem == 5))
  1553. && ((i.operands == 1
  1554. diff --git a/gas/testsuite/gas/aarch64/illegal-dotproduct.d b/gas/testsuite/gas/aarch64/illegal-dotproduct.d
  1555. new file mode 100644
  1556. index 0000000000..8d8b1b8506
  1557. --- /dev/null
  1558. +++ b/gas/testsuite/gas/aarch64/illegal-dotproduct.d
  1559. @@ -0,0 +1,4 @@
  1560. +#as: -march=armv8.2-a+dotprod
  1561. +#name: Invalid dotproduct instructions.
  1562. +#source: illegal-dotproduct.s
  1563. +#error-output: illegal-dotproduct.l
  1564. diff --git a/gas/testsuite/gas/aarch64/illegal-dotproduct.l b/gas/testsuite/gas/aarch64/illegal-dotproduct.l
  1565. new file mode 100644
  1566. index 0000000000..06d0d78b8d
  1567. --- /dev/null
  1568. +++ b/gas/testsuite/gas/aarch64/illegal-dotproduct.l
  1569. @@ -0,0 +1,13 @@
  1570. +[^:]+: Assembler messages:
  1571. +[^:]+:[0-9]+: Error: register element index out of range 0 to 3 at operand 3 -- `udot V0.2S,V0.8B,V0.4B\[4\]'
  1572. +[^:]+:[0-9]+: Error: operand mismatch -- `udot V0.4S,V0.8B,V0.4B\[4\]'
  1573. +[^:]+:[0-9]+: Info: did you mean this\?
  1574. +[^:]+:[0-9]+: Info: udot v0.2s, v0.8b, v0.4b\[4\]
  1575. +[^:]+:[0-9]+: Info: other valid variant\(s\):
  1576. +[^:]+:[0-9]+: Info: udot v0.4s, v0.16b, v0.4b\[4\]
  1577. +[^:]+:[0-9]+: Error: register element index out of range 0 to 3 at operand 3 -- `sdot V0.2S,V0.8B,V0.4B\[4\]'
  1578. +[^:]+:[0-9]+: Error: operand mismatch -- `sdot V0.2S,V0.8B,V0.4H\[4\]'
  1579. +[^:]+:[0-9]+: Info: did you mean this\?
  1580. +[^:]+:[0-9]+: Info: sdot v0.2s, v0.8b, v0.4b\[4\]
  1581. +[^:]+:[0-9]+: Info: other valid variant\(s\):
  1582. +[^:]+:[0-9]+: Info: sdot v0.4s, v0.16b, v0.4b\[4\]
  1583. diff --git a/gas/testsuite/gas/aarch64/illegal-dotproduct.s b/gas/testsuite/gas/aarch64/illegal-dotproduct.s
  1584. new file mode 100644
  1585. index 0000000000..9c714ae54d
  1586. --- /dev/null
  1587. +++ b/gas/testsuite/gas/aarch64/illegal-dotproduct.s
  1588. @@ -0,0 +1,4 @@
  1589. +UDOT V0.2S, V0.8B, V0.4B[4]
  1590. +UDOT V0.4S, V0.8B, V0.4B[4]
  1591. +SDOT V0.2S, V0.8B, V0.4B[4]
  1592. +SDOT V0.2S, V0.8B, V0.4H[4]
  1593. diff --git a/gas/testsuite/gas/arm/undefined-insn-arm.d b/gas/testsuite/gas/arm/undefined-insn-arm.d
  1594. new file mode 100644
  1595. index 0000000000..175e778b50
  1596. --- /dev/null
  1597. +++ b/gas/testsuite/gas/arm/undefined-insn-arm.d
  1598. @@ -0,0 +1,5 @@
  1599. +#name: Undefined binary printing in arm mode
  1600. +#skip: *-*-pe *-*-vxworks
  1601. +#source: undefined-insn.s
  1602. +#objdump: -D -b binary -m armv5te
  1603. +#...
  1604. diff --git a/gas/testsuite/gas/arm/undefined-insn-thumb.d b/gas/testsuite/gas/arm/undefined-insn-thumb.d
  1605. new file mode 100644
  1606. index 0000000000..a5b4159f1e
  1607. --- /dev/null
  1608. +++ b/gas/testsuite/gas/arm/undefined-insn-thumb.d
  1609. @@ -0,0 +1,5 @@
  1610. +#name: Undefined binary printing in thumb mode
  1611. +#skip: *-*-pe *-*-vxworks
  1612. +#source: undefined-insn.s
  1613. +#objdump: -D -b binary -m armv5te -M force-thumb
  1614. +#...
  1615. diff --git a/gas/testsuite/gas/arm/undefined-insn.s b/gas/testsuite/gas/arm/undefined-insn.s
  1616. new file mode 100644
  1617. index 0000000000..cf59a03d1d
  1618. --- /dev/null
  1619. +++ b/gas/testsuite/gas/arm/undefined-insn.s
  1620. @@ -0,0 +1 @@
  1621. + .inst 0xffffffff
  1622. diff --git a/gas/testsuite/gas/i386/evex-no-scale-32.d b/gas/testsuite/gas/i386/evex-no-scale-32.d
  1623. new file mode 100644
  1624. index 0000000000..0a2860d32e
  1625. --- /dev/null
  1626. +++ b/gas/testsuite/gas/i386/evex-no-scale-32.d
  1627. @@ -0,0 +1,12 @@
  1628. +#objdump: -dw
  1629. +#name: ix86 EVEX no disp scaling
  1630. +
  1631. +.*: +file format .*
  1632. +
  1633. +Disassembly of section .text:
  1634. +
  1635. +0+ <disp>:
  1636. + +[a-f0-9]+: 62 f1 7c 48 28 04 05 40 00 00 00 vmovaps 0x40\(,%eax,1\),%zmm0
  1637. + +[a-f0-9]+: 62 f1 7c 48 28 04 25 40 00 00 00 vmovaps 0x40\(,%eiz,1\),%zmm0
  1638. + +[a-f0-9]+: 62 f1 7c 48 28 05 40 00 00 00 vmovaps 0x40,%zmm0
  1639. + +[a-f0-9]+: 67 62 f1 7c 48 28 06 40 00 vmovaps 0x40,%zmm0
  1640. diff --git a/gas/testsuite/gas/i386/evex-no-scale-32.s b/gas/testsuite/gas/i386/evex-no-scale-32.s
  1641. new file mode 100644
  1642. index 0000000000..e28c73f2a3
  1643. --- /dev/null
  1644. +++ b/gas/testsuite/gas/i386/evex-no-scale-32.s
  1645. @@ -0,0 +1,7 @@
  1646. + .allow_index_reg
  1647. + .text
  1648. +disp:
  1649. + vmovaps 64(,%eax), %zmm0
  1650. + vmovaps 64(,%eiz), %zmm0
  1651. + vmovaps 64, %zmm0
  1652. + addr16 vmovaps 64, %zmm0
  1653. diff --git a/gas/testsuite/gas/i386/evex-no-scale-64.d b/gas/testsuite/gas/i386/evex-no-scale-64.d
  1654. new file mode 100644
  1655. index 0000000000..d52d947ab3
  1656. --- /dev/null
  1657. +++ b/gas/testsuite/gas/i386/evex-no-scale-64.d
  1658. @@ -0,0 +1,14 @@
  1659. +#objdump: -dw
  1660. +#name: x86-64 EVEX no disp scaling
  1661. +
  1662. +.*: +file format .*
  1663. +
  1664. +Disassembly of section .text:
  1665. +
  1666. +0+ <disp>:
  1667. + +[a-f0-9]+: 62 f1 7c 48 28 05 00 fc ff ff vmovaps -0x400\(%rip\),%zmm0 # .*
  1668. + +[a-f0-9]+: 62 f1 7c 48 28 04 05 40 00 00 00 vmovaps 0x40\(,%rax,1\),%zmm0
  1669. + +[a-f0-9]+: 62 f1 7c 48 28 04 25 40 00 00 00 vmovaps 0x40,%zmm0
  1670. + +[a-f0-9]+: 67 62 f1 7c 48 28 04 05 40 00 00 00 vmovaps 0x40\(,%eax,1\),%zmm0
  1671. + +[a-f0-9]+: 67 62 f1 7c 48 28 04 25 40 00 00 00 addr32 vmovaps 0x40,%zmm0
  1672. + +[a-f0-9]+: 62 f1 7c 48 28 04 25 40 00 00 00 vmovaps 0x40,%zmm0
  1673. diff --git a/gas/testsuite/gas/i386/evex-no-scale-64.s b/gas/testsuite/gas/i386/evex-no-scale-64.s
  1674. new file mode 100644
  1675. index 0000000000..bc3749cc0c
  1676. --- /dev/null
  1677. +++ b/gas/testsuite/gas/i386/evex-no-scale-64.s
  1678. @@ -0,0 +1,9 @@
  1679. + .allow_index_reg
  1680. + .text
  1681. +disp:
  1682. + vmovaps -1024(%rip), %zmm0
  1683. + vmovaps 64(,%rax), %zmm0
  1684. + vmovaps 64(,%riz), %zmm0
  1685. + vmovaps 64(,%eax), %zmm0
  1686. + vmovaps 64(,%eiz), %zmm0
  1687. + vmovaps 64, %zmm0
  1688. diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
  1689. index 9cc927a962..3987862477 100644
  1690. --- a/gas/testsuite/gas/i386/i386.exp
  1691. +++ b/gas/testsuite/gas/i386/i386.exp
  1692. @@ -525,6 +525,8 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]]
  1693. run_dump_test "nop-5"
  1694. run_dump_test "nop-6"
  1695. + run_dump_test "evex-no-scale-32"
  1696. +
  1697. if { [gas_64_check] } then {
  1698. run_dump_test "att-regs"
  1699. run_dump_test "intel-regs"
  1700. @@ -1017,6 +1019,8 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
  1701. run_dump_test "x86-64-nop-4"
  1702. run_dump_test "x86-64-nop-5"
  1703. run_dump_test "x86-64-nop-6"
  1704. +
  1705. + run_dump_test "evex-no-scale-64"
  1706. }
  1707. set ASFLAGS "$old_ASFLAGS"
  1708. diff --git a/gas/testsuite/gas/i386/mixed-mode-reloc32.d b/gas/testsuite/gas/i386/mixed-mode-reloc32.d
  1709. index a2ef6a0b85..59234bc9be 100644
  1710. --- a/gas/testsuite/gas/i386/mixed-mode-reloc32.d
  1711. +++ b/gas/testsuite/gas/i386/mixed-mode-reloc32.d
  1712. @@ -7,7 +7,7 @@
  1713. RELOCATION RECORDS FOR \[.text\]:
  1714. OFFSET[ ]+TYPE[ ]+VALUE[ ]*
  1715. -[0-9a-f]+[ ]+R_386_GOT32X[ ]+xtrn[ ]*
  1716. +[0-9a-f]+[ ]+R_386_GOT32[ ]+xtrn[ ]*
  1717. [0-9a-f]+[ ]+R_386_PLT32[ ]+xtrn[ ]*
  1718. [0-9a-f]+[ ]+R_386_GOT32X[ ]+xtrn[ ]*
  1719. [0-9a-f]+[ ]+R_386_PLT32[ ]+xtrn[ ]*
  1720. diff --git a/gas/testsuite/gas/i386/se1.d b/gas/testsuite/gas/i386/se1.d
  1721. index ff2685c781..d7800ab885 100644
  1722. --- a/gas/testsuite/gas/i386/se1.d
  1723. +++ b/gas/testsuite/gas/i386/se1.d
  1724. @@ -10,4 +10,5 @@ Disassembly of section .text:
  1725. 0+ <_start>:
  1726. [ ]*[a-f0-9]+: 0f 01 cf encls
  1727. [ ]*[a-f0-9]+: 0f 01 d7 enclu
  1728. +[ ]*[a-f0-9]+: 0f 01 c0 enclv
  1729. #pass
  1730. diff --git a/gas/testsuite/gas/i386/se1.s b/gas/testsuite/gas/i386/se1.s
  1731. index 1b57ac87fe..92d57952c0 100644
  1732. --- a/gas/testsuite/gas/i386/se1.s
  1733. +++ b/gas/testsuite/gas/i386/se1.s
  1734. @@ -5,3 +5,4 @@ _start:
  1735. encls
  1736. enclu
  1737. + enclv
  1738. diff --git a/gas/testsuite/gas/i386/x86-64-se1.d b/gas/testsuite/gas/i386/x86-64-se1.d
  1739. index 29494f0090..a515219406 100644
  1740. --- a/gas/testsuite/gas/i386/x86-64-se1.d
  1741. +++ b/gas/testsuite/gas/i386/x86-64-se1.d
  1742. @@ -10,4 +10,5 @@ Disassembly of section .text:
  1743. 0+ <_start>:
  1744. [ ]*[a-f0-9]+: 0f 01 cf encls
  1745. [ ]*[a-f0-9]+: 0f 01 d7 enclu
  1746. +[ ]*[a-f0-9]+: 0f 01 c0 enclv
  1747. #pass
  1748. diff --git a/gas/testsuite/gas/i386/x86-64-se1.s b/gas/testsuite/gas/i386/x86-64-se1.s
  1749. index 1b57ac87fe..92d57952c0 100644
  1750. --- a/gas/testsuite/gas/i386/x86-64-se1.s
  1751. +++ b/gas/testsuite/gas/i386/x86-64-se1.s
  1752. @@ -5,3 +5,4 @@ _start:
  1753. encls
  1754. enclu
  1755. + enclv
  1756. diff --git a/gas/testsuite/gas/i386/xmmword.l b/gas/testsuite/gas/i386/xmmword.l
  1757. index ce3af8d150..7d25cb3de2 100644
  1758. --- a/gas/testsuite/gas/i386/xmmword.l
  1759. +++ b/gas/testsuite/gas/i386/xmmword.l
  1760. @@ -99,3 +99,7 @@
  1761. .*:127: Error: .* `vpmovzxwq'
  1762. .*:128: Error: .* `vpmovzxwq'
  1763. .*:129: Error: .* `vpmovzxwq'
  1764. +.*:131: Error: .* `vcvtps2qq'
  1765. +.*:132: Error: .* `vcvtps2uqq'
  1766. +.*:133: Error: .* `vcvttps2qq'
  1767. +.*:134: Error: .* `vcvttps2uqq'
  1768. diff --git a/gas/testsuite/gas/i386/xmmword.s b/gas/testsuite/gas/i386/xmmword.s
  1769. index 47d2d8d595..ffe7aca3cb 100644
  1770. --- a/gas/testsuite/gas/i386/xmmword.s
  1771. +++ b/gas/testsuite/gas/i386/xmmword.s
  1772. @@ -127,3 +127,8 @@ xmmword:
  1773. vpmovzxwq xmm0{k7}, xmmword ptr [eax]
  1774. vpmovzxwq ymm0, xmmword ptr [eax]
  1775. vpmovzxwq ymm0{k7}, xmmword ptr [eax]
  1776. +
  1777. + vcvtps2qq xmm0, xmmword ptr [rax]
  1778. + vcvtps2uqq xmm0, xmmword ptr [rax]
  1779. + vcvttps2qq xmm0, xmmword ptr [rax]
  1780. + vcvttps2uqq xmm0, xmmword ptr [rax]
  1781. diff --git a/gold/ChangeLog b/gold/ChangeLog
  1782. index 18af5e69b1..cf998d901a 100644
  1783. --- a/gold/ChangeLog
  1784. +++ b/gold/ChangeLog
  1785. @@ -1,3 +1,15 @@
  1786. +2018-08-06 Cary Coutant <ccoutant@gmail.com>
  1787. +
  1788. + PR gold/23455
  1789. + * options.h (General_options): Add --warn-drop-version option.
  1790. + * symtab.cc (Symbol_table::set_dynsym_indexes): Check it.
  1791. +
  1792. +2018-08-06 Cary Coutant <ccoutant@gmail.com>
  1793. +
  1794. + * target.h (Sized_target::record_gnu_property): Change first two
  1795. + parameters to unsigned int.
  1796. + * x86_64.cc (Target_x86_64::record_gnu_property): Likewise.
  1797. +
  1798. 2018-07-18 Nick Clifton <nickc@redhat.com>
  1799. 2.31.1 Release point.
  1800. diff --git a/gold/options.h b/gold/options.h
  1801. index 98d6be8009..11054981c9 100644
  1802. --- a/gold/options.h
  1803. +++ b/gold/options.h
  1804. @@ -1361,6 +1361,10 @@ class General_options
  1805. DEFINE_bool_ignore(warn_constructors, options::TWO_DASHES, '\0',
  1806. N_("Ignored"), N_("Ignored"));
  1807. + DEFINE_bool(warn_drop_version, options::TWO_DASHES, '\0', false,
  1808. + N_("Warn when discarding version information"),
  1809. + N_("Do not warn when discarding version information"));
  1810. +
  1811. DEFINE_bool(warn_execstack, options::TWO_DASHES, '\0', false,
  1812. N_("Warn if the stack is executable"),
  1813. N_("Do not warn if the stack is executable"));
  1814. diff --git a/gold/symtab.cc b/gold/symtab.cc
  1815. index aa7644156f..759e0d0222 100644
  1816. --- a/gold/symtab.cc
  1817. +++ b/gold/symtab.cc
  1818. @@ -2623,11 +2623,12 @@ Symbol_table::set_dynsym_indexes(unsigned int index,
  1819. versions->record_version(this, dynpool, sym);
  1820. else
  1821. {
  1822. - gold_warning(_("discarding version information for "
  1823. - "%s@%s, defined in unused shared library %s "
  1824. - "(linked with --as-needed)"),
  1825. - sym->name(), sym->version(),
  1826. - sym->object()->name().c_str());
  1827. + if (parameters->options().warn_drop_version())
  1828. + gold_warning(_("discarding version information for "
  1829. + "%s@%s, defined in unused shared library %s "
  1830. + "(linked with --as-needed)"),
  1831. + sym->name(), sym->version(),
  1832. + sym->object()->name().c_str());
  1833. sym->clear_version();
  1834. }
  1835. }
  1836. diff --git a/gold/target.h b/gold/target.h
  1837. index bb312067b5..bbc87396f6 100644
  1838. --- a/gold/target.h
  1839. +++ b/gold/target.h
  1840. @@ -1147,7 +1147,8 @@ class Sized_target : public Target
  1841. // Record a target-specific program property in the .note.gnu.property
  1842. // section.
  1843. virtual void
  1844. - record_gnu_property(int, int, size_t, const unsigned char*, const Object*)
  1845. + record_gnu_property(unsigned int, unsigned int, size_t,
  1846. + const unsigned char*, const Object*)
  1847. { }
  1848. // Merge the target-specific program properties from the current object.
  1849. diff --git a/gold/x86_64.cc b/gold/x86_64.cc
  1850. index 27f273d64b..9d742f6f13 100644
  1851. --- a/gold/x86_64.cc
  1852. +++ b/gold/x86_64.cc
  1853. @@ -1307,7 +1307,8 @@ class Target_x86_64 : public Sized_target<size, false>
  1854. // Record a target-specific program property in the .note.gnu.property
  1855. // section.
  1856. void
  1857. - record_gnu_property(int, int, size_t, const unsigned char*, const Object*);
  1858. + record_gnu_property(unsigned int, unsigned int, size_t,
  1859. + const unsigned char*, const Object*);
  1860. // Merge the target-specific program properties from the current object.
  1861. void
  1862. @@ -1579,7 +1580,7 @@ Target_x86_64<size>::rela_irelative_section(Layout* layout)
  1863. template<int size>
  1864. void
  1865. Target_x86_64<size>::record_gnu_property(
  1866. - int, int pr_type,
  1867. + unsigned int, unsigned int pr_type,
  1868. size_t pr_datasz, const unsigned char* pr_data,
  1869. const Object* object)
  1870. {
  1871. diff --git a/include/ChangeLog b/include/ChangeLog
  1872. index 7decb4fd7b..e0b82bc338 100644
  1873. --- a/include/ChangeLog
  1874. +++ b/include/ChangeLog
  1875. @@ -1,3 +1,9 @@
  1876. +2018-11-15 Claudiu Zissulescu <claziss@synopsys.com>
  1877. +
  1878. + Backport from mainline
  1879. + 2018-08-01 Cupertino Miranda <cmiranda@synopsys.com>
  1880. + * arc-reloc.def (ARC_TLS_LE_32): Updated reloc formula.
  1881. +
  1882. 2018-07-18 Nick Clifton <nickc@redhat.com>
  1883. 2.31.1 Release point.
  1884. diff --git a/include/elf/arc-reloc.def b/include/elf/arc-reloc.def
  1885. index a6db724da9..61edd6e67a 100644
  1886. --- a/include/elf/arc-reloc.def
  1887. +++ b/include/elf/arc-reloc.def
  1888. @@ -468,7 +468,7 @@ ARC_RELOC_HOWTO(ARC_TLS_DTPOFF, 67, \
  1889. 32, \
  1890. replace_word32, \
  1891. dont, \
  1892. - ( ME ( S - SECTSTART ) + A ))
  1893. + ( ME ( S - FINAL_SECTSTART ) + A ))
  1894. ARC_RELOC_HOWTO(ARC_TLS_DTPOFF_S9, 73, \
  1895. 2, \
  1896. @@ -489,7 +489,7 @@ ARC_RELOC_HOWTO(ARC_TLS_LE_32, 75, \
  1897. 32, \
  1898. replace_word32, \
  1899. dont, \
  1900. - ( ME ( ( ( ( S + A ) + TCB_SIZE ) - TLS_REL ) ) ))
  1901. + ( ME ( ( ( ( S + A ) + TLS_TBSS ) - TLS_REL ) ) ))
  1902. ARC_RELOC_HOWTO(ARC_S25W_PCREL_PLT, 76, \
  1903. 2, \
  1904. diff --git a/ld/ChangeLog b/ld/ChangeLog
  1905. index c07e442c84..38963b90cf 100644
  1906. --- a/ld/ChangeLog
  1907. +++ b/ld/ChangeLog
  1908. @@ -1,3 +1,134 @@
  1909. +2018-11-30 Alan Modra <amodra@gmail.com>
  1910. +
  1911. + * testsuite/ld-powerpc/pr23937.d,
  1912. + * testsuite/ld-powerpc/pr23937.s: New test.
  1913. + * testsuite/ld-powerpc/powerpc.exp: Run it.
  1914. +
  1915. +2018-11-27 Tamar Christina <tamar.christina@arm.com>
  1916. +
  1917. + PR ld/23904
  1918. + * testsuite/ld-aarch64/aarch64-elf.exp: Add erratum843419_tls_ie.
  1919. + * testsuite/ld-aarch64/erratum843419_tls_ie.d: New test.
  1920. + * testsuite/ld-aarch64/erratum843419_tls_ie.s: New test.
  1921. +
  1922. +2018-11-06 H.J. Lu <hongjiu.lu@intel.com>
  1923. +
  1924. + PR gas/23854
  1925. + * testsuite/ld-i386/i386.exp: Run pr23854.
  1926. + * testsuite/ld-x86-64/x86-64.exp: Likewwise.
  1927. + * testsuite/ld-i386/pr23854.d: New file.
  1928. + * testsuite/ld-i386/pr23854.s: Likewwise.
  1929. + * testsuite/ld-i386/pr23854.d: Likewwise.
  1930. + * testsuite/ld-x86-64/pr23854.d: Likewwise.
  1931. + * testsuite/ld-x86-64/pr23854.s: Likewwise.
  1932. +
  1933. +2018-11-06 H.J. Lu <hongjiu.lu@intel.com>
  1934. +
  1935. + PR ld/23818
  1936. + * testsuite/ld-plugin/lto.exp: Run PR ld/23818 test.
  1937. + * testsuite/ld-plugin/pr23818.d: New file.
  1938. + * testsuite/ld-plugin/pr23818.t: Likewise.
  1939. + * testsuite/ld-plugin/pr23818a.c: Likewise.
  1940. + * testsuite/ld-plugin/pr23818b.c: Likewise.
  1941. +
  1942. +2018-08-12 H.J. Lu <hongjiu.lu@intel.com>
  1943. +
  1944. + * testsuite/ld-x86-64/pr23486b.d: Swap pr23486a.s and pr23486a.s.
  1945. +
  1946. +2018-08-12 H.J. Lu <hongjiu.lu@intel.com>
  1947. +
  1948. + PR ld/23428
  1949. + * testsuite/ld-elf/dummy.s: New file.
  1950. + * testsuite/ld-elf/linux-x86.S: Add X86_FEATURE_1_AND property.
  1951. + * testsuite/ld-elf/linux-x86.exp: Add dummy.s to pr23428.
  1952. +
  1953. +2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
  1954. +
  1955. + PR ld/23486
  1956. + * testsuite/ld-i386/i386.exp: Run PR ld/23486 tests.
  1957. + * testsuite/ld-x86-64/x86-64.exp: Likewise.
  1958. + * testsuite/ld-i386/pr23486a.d: New file.
  1959. + * testsuite/ld-i386/pr23486b.d: Likewise.
  1960. + * testsuite/ld-x86-64/pr23486a-x32.d: Likewise.
  1961. + * testsuite/ld-x86-64/pr23486a.d: Likewise.
  1962. + * testsuite/ld-x86-64/pr23486a.s: Likewise.
  1963. + * testsuite/ld-x86-64/pr23486b-x32.d: Likewise.
  1964. + * testsuite/ld-x86-64/pr23486b.d: Likewise.
  1965. + * testsuite/ld-x86-64/pr23486b.s: Likewise.
  1966. + * testsuite/ld-i386/property-3.r: Remove "x86 ISA used".
  1967. + * testsuite/ld-i386/property-4.r: Likewise.
  1968. + * testsuite/ld-i386/property-5.r: Likewise.
  1969. + * testsuite/ld-i386/property-x86-ibt3a.d: Likewise.
  1970. + * testsuite/ld-i386/property-x86-ibt3b.d: Likewise.
  1971. + * testsuite/ld-i386/property-x86-shstk3a.d: Likewise.
  1972. + * testsuite/ld-i386/property-x86-shstk3b.d: Likewise.
  1973. + * testsuite/ld-x86-64/property-3.r: Likewise.
  1974. + * testsuite/ld-x86-64/property-4.r: Likewise.
  1975. + * testsuite/ld-x86-64/property-5.r: Likewise.
  1976. + * testsuite/ld-x86-64/property-x86-ibt3a-x32.d: Likewise.
  1977. + * testsuite/ld-x86-64/property-x86-ibt3a.d: Likewise.
  1978. + * testsuite/ld-x86-64/property-x86-ibt3b-x32.d: Likewise.
  1979. + * testsuite/ld-x86-64/property-x86-ibt3b.d: Likewise.
  1980. + * testsuite/ld-x86-64/property-x86-shstk3a-x32.d: Likewise.
  1981. + * testsuite/ld-x86-64/property-x86-shstk3a.d: Likewise.
  1982. + * testsuite/ld-x86-64/property-x86-shstk3b-x32.d: Likewise.
  1983. + * testsuite/ld-x86-64/property-x86-shstk3b.d: Likewise.
  1984. +
  1985. +2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
  1986. +
  1987. + * testsuite/ld-x86-64/property-x86-3.s: Use ".p2align 2" to
  1988. + align .note.gnu.property section if __64_bit__ is undefined.
  1989. +
  1990. +2018-08-01 Alan Modra <amodra@gmail.com>
  1991. +
  1992. + * testsuite/ld-powerpc/powerpc.exp: Run tlsopt5 with hash-style
  1993. + specified.
  1994. +
  1995. +2018-08-01 Alan Modra <amodra@gmail.com>
  1996. +
  1997. + * testsuite/ld-powerpc/powerpc.exp: Run tlsopt5 with plt alignment.
  1998. + * testsuite/ld-powerpc/tlsopt5.s: Add extra call.
  1999. + * testsuite/ld-powerpc/tlsopt5.wf: Adjust expected output.
  2000. + * testsuite/ld-powerpc/tlsopt5.d: Likewise.
  2001. +
  2002. +2018-08-07 Nick Clifton <nickc@redhat.com>
  2003. +
  2004. + * po/bg.po: Updated Bulgarian translation.
  2005. +
  2006. +2018-08-01 Roland McGrath <mcgrathr@google.com>
  2007. +
  2008. + * testsuite/ld-aarch64/ifunc-1-local.d: Adjust regexps to match
  2009. + the offsets emitted by aarch64-elf configurations.
  2010. + * testsuite/ld-aarch64/ifunc-1.d: Likewise.
  2011. + * testsuite/ld-aarch64/ifunc-2-local.d: Likewise.
  2012. + * testsuite/ld-aarch64/ifunc-2.d: Likewise.
  2013. + * testsuite/ld-aarch64/ifunc-21.d: Likewise.
  2014. + * testsuite/ld-aarch64/ifunc-3a.d: Likewise.
  2015. +
  2016. +2018-07-23 H.J. Lu <hongjiu.lu@intel.com>
  2017. +
  2018. + PR ld/23428
  2019. + * testsuite/ld-elf/linux-x86.S: New file.
  2020. + * testsuite/ld-elf/linux-x86.exp: Likewise.
  2021. + * testsuite/ld-elf/pr23428.c: Likewise.
  2022. + * testsuite/ld-elf/sec64k.exp: Pass "-z noseparate-code" to ld
  2023. + for Linux/x86 targets.
  2024. + * testsuite/ld-i386/abs-iamcu.d: Likewise.
  2025. + * testsuite/ld-i386/abs.d: Likewise.
  2026. + * testsuite/ld-i386/pr12718.d: Likewise.
  2027. + * testsuite/ld-i386/pr12921.d: Likewise.
  2028. + * testsuite/ld-x86-64/abs-k1om.d: Likewise.
  2029. + * testsuite/ld-x86-64/abs-l1om.d: Likewise.
  2030. + * testsuite/ld-x86-64/abs.d: Likewise.
  2031. + * testsuite/ld-x86-64/pr12718.d: Likewise.
  2032. + * testsuite/ld-x86-64/pr12921.d: Likewise.
  2033. + * testsuite/ld-linkonce/zeroeh.ld: Discard .note.gnu.property
  2034. + section.
  2035. + * testsuite/ld-scripts/print-memory-usage.t: Likewise.
  2036. + * testsuite/ld-scripts/size-2.t: Likewise.
  2037. + * testsuite/lib/ld-lib.exp (run_ld_link_exec_tests): Use ld to
  2038. + create executable if language is "asm".
  2039. +
  2040. 2018-07-18 Nick Clifton <nickc@redhat.com>
  2041. 2.31.1 Release point.
  2042. diff --git a/ld/po/bg.po b/ld/po/bg.po
  2043. index 5e8e818818..bf6ecd9b61 100644
  2044. --- a/ld/po/bg.po
  2045. +++ b/ld/po/bg.po
  2046. @@ -13,7 +13,7 @@ msgstr ""
  2047. "Project-Id-Version: ld 2.30.90\n"
  2048. "Report-Msgid-Bugs-To: bug-binutils@gnu.org\n"
  2049. "POT-Creation-Date: 2018-06-24 19:43+0100\n"
  2050. -"PO-Revision-Date: 2018-06-28 22:58+0300\n"
  2051. +"PO-Revision-Date: 2018-07-26 20:34+0300\n"
  2052. "Last-Translator: Румен Петров <transl@roumenpetrov.info>\n"
  2053. "Language-Team: Bulgarian <dict@ludost.net>\n"
  2054. "Language: bg\n"
  2055. @@ -33,7 +33,7 @@ msgstr "%X%P: cref_hash_lookup не успя: %E\n"
  2056. #: ldcref.c:186
  2057. msgid "%X%P: cref alloc failed: %E\n"
  2058. -msgstr "%X%P: пропадна заделяне(на памет) за cref: %E\n"
  2059. +msgstr "%X%P: не успя заделянето на памет в cref: %E\n"
  2060. #: ldcref.c:371
  2061. #, c-format
  2062. @@ -62,7 +62,7 @@ msgstr "Без имена\n"
  2063. #: ldcref.c:413 ldcref.c:565
  2064. msgid "%P: symbol `%pT' missing from main hash table\n"
  2065. -msgstr "%P: име '%pT' липсва в главната хеш-таблица\n"
  2066. +msgstr "%P: в главния речник липсва името '%pT'\n"
  2067. #: ldcref.c:517 ldcref.c:628 ldmain.c:1211 ldmisc.c:335 pe-dll.c:715
  2068. #: pe-dll.c:1296 pe-dll.c:1417 pe-dll.c:1535 earm_wince_pe.c:1430
  2069. @@ -87,7 +87,7 @@ msgstr "%X%P: %C: забранено е кръстосана отпратка о
  2070. #: ldctor.c:83
  2071. msgid "%X%P: different relocs used in set %s\n"
  2072. -msgstr "%X%P: различни \"преместванията\" се използват в множеството %s\n"
  2073. +msgstr "%X%P: различни \"премествания\" се използват в набора %s\n"
  2074. #: ldctor.c:101
  2075. msgid "%X%P: different object file formats composing set %s\n"
  2076. @@ -103,7 +103,7 @@ msgstr "%X%P: раздел %s не поддържа преместване %s з
  2077. #: ldctor.c:321
  2078. msgid "%X%P: unsupported size %d for set %s\n"
  2079. -msgstr "%X%P: неподдържан размер %d за множеството %s\n"
  2080. +msgstr "%X%P: неподдържан размер %d за набор %s\n"
  2081. #: ldctor.c:344
  2082. msgid ""
  2083. @@ -202,7 +202,7 @@ msgstr "%F%P:%pS не може да се върне обратно брояч н
  2084. #: ldexp.c:1167
  2085. msgid "%F%P:%s: hash creation failed\n"
  2086. -msgstr "%F%P:%s: пропадна създаването на хеш\n"
  2087. +msgstr "%F%P:%s: не успя създаването на хеш\n"
  2088. #: ldexp.c:1519 ldexp.c:1545 ldexp.c:1605
  2089. msgid "%F%P:%pS: nonconstant expression for %s\n"
  2090. @@ -210,7 +210,7 @@ msgstr "%F%P:%pS: не е константен изразът за %s\n"
  2091. #: ldexp.c:1631 ldlang.c:1234 ldlang.c:3187 ldlang.c:7174
  2092. msgid "%F%P: can not create hash table: %E\n"
  2093. -msgstr "%F%P: не може да се създаде хеш-таблицата: %E\n"
  2094. +msgstr "%F%P: не може да се създаде речник: %E\n"
  2095. #: ldfile.c:132 eaarch64cloudabi.c:656 eaarch64cloudabib.c:656
  2096. #: eaarch64elf.c:656 eaarch64elf32.c:656 eaarch64elf32b.c:656
  2097. @@ -286,12 +286,12 @@ msgstr "%F%P: не може да се създаде хеш-таблицата:
  2098. #: eshlelf_vxworks.c:370 ev850.c:387 ev850_rh850.c:387 exgateelf.c:341
  2099. #, c-format
  2100. msgid "attempt to open %s failed\n"
  2101. -msgstr "опита да се отвори %s не успя\n"
  2102. +msgstr "опитът да се отвори %s не успя\n"
  2103. #: ldfile.c:134
  2104. #, c-format
  2105. msgid "attempt to open %s succeeded\n"
  2106. -msgstr "опита да се отвори %s успя\n"
  2107. +msgstr "опитът да се отвори %s успя\n"
  2108. #: ldfile.c:140
  2109. msgid "%F%P: invalid BFD target `%s'\n"
  2110. @@ -353,7 +353,7 @@ msgstr "%F%P:%pS: грешка: синоним за област памет по
  2111. #: ldlang.c:1372
  2112. msgid "%F%P:%pS: error: redefinition of memory region alias `%s'\n"
  2113. -msgstr "%F%P:%pS: грешка: повторен определение на синоним за област памет '%s'\n"
  2114. +msgstr "%F%P:%pS: грешка: повторено определение на синоним за област памет '%s'\n"
  2115. #: ldlang.c:1379
  2116. msgid "%F%P:%pS: error: memory region `%s' for alias `%s' does not exist\n"
  2117. @@ -361,7 +361,7 @@ msgstr "%F%P:%pS: грешка: област памет '%s' за синоним
  2118. #: ldlang.c:1438 ldlang.c:1477
  2119. msgid "%F%P: failed creating section `%s': %E\n"
  2120. -msgstr "%F%P: пропадна създаването на раздел '%s': %E\n"
  2121. +msgstr "%F%P: не успя създаването на раздел '%s': %E\n"
  2122. #: ldlang.c:1998
  2123. msgid ""
  2124. @@ -439,7 +439,7 @@ msgstr "%F%P: %pB: файлът не е разпознат: %E\n"
  2125. #: ldlang.c:2854
  2126. msgid "%F%P: %pB: member %pB in archive is not an object\n"
  2127. -msgstr "%F%P: %pB: членът, на архива %pB, не е обект\n"
  2128. +msgstr "%F%P: %pB: членът на архива %pB не е обект\n"
  2129. #: ldlang.c:2869 ldlang.c:2883 eaarch64cloudabi.c:776 eaarch64cloudabib.c:776
  2130. #: eaarch64elf.c:776 eaarch64elf32.c:776 eaarch64elf32b.c:776
  2131. @@ -518,7 +518,7 @@ msgstr "%F%P: %pB: грешка при добавяне на имената: %E\
  2132. #: ldlang.c:3157
  2133. msgid "%P: warning: could not find any targets that match endianness requirement\n"
  2134. -msgstr "%P: предупреждение: не може да се открие резултат, който да отговаря на изискванията за подредба(на байтовете)\n"
  2135. +msgstr "%P: предупреждение: не може да се открие резултат, който да отговаря на изискванията за подредба на байтовете\n"
  2136. #: ldlang.c:3171
  2137. msgid "%F%P: target %s not found\n"
  2138. @@ -546,7 +546,7 @@ msgstr "%X%P: не е определено задължителното име '
  2139. #: ldlang.c:3770
  2140. msgid "%F%P: %s not found for insert\n"
  2141. -msgstr "%F%P: %s не е намерен(за добавяне)\n"
  2142. +msgstr "%F%P: %s не е намерен за добавяне\n"
  2143. #: ldlang.c:4011
  2144. msgid " load address 0x%V"
  2145. @@ -598,7 +598,7 @@ msgstr "%X%P: %pB раздел '%s' не се побира в област '%s'\
  2146. #: ldlang.c:5050
  2147. msgid "%F%P:%pS: non constant or forward reference address expression for section %s\n"
  2148. -msgstr "%F%P:%pS: адресния израз не е константен или отпратка за по нататък при раздел %s\n"
  2149. +msgstr "%F%P:%pS: адресният израз не е константен или е отпратка за по нататък при раздел %s\n"
  2150. #: ldlang.c:5075
  2151. msgid "%X%P: internal error on COFF shared library section %s\n"
  2152. @@ -664,7 +664,7 @@ msgstr "%X%P: %s архитектурата на входен файл '%pB' е
  2153. #: ldlang.c:6332
  2154. msgid "%X%P: failed to merge target specific data of file %pB\n"
  2155. -msgstr "%X%P: пропадна сливането, на специфични за резултата данни, от файл %pB\n"
  2156. +msgstr "%X%P: не успя сливането на целеви данни от файл %pB\n"
  2157. #: ldlang.c:6403
  2158. msgid "%F%P: could not define common symbol `%pT': %E\n"
  2159. @@ -704,7 +704,7 @@ msgstr "%F%P:%pS: грешка: зададено е подравняване с
  2160. #: ldlang.c:7198
  2161. msgid "%F%P: %s: plugin reported error after all symbols read\n"
  2162. -msgstr "%F%P: %s: приставката рапортува грешка, след прочитане на всички имена\n"
  2163. +msgstr "%F%P: %s: приставката отчете грешка след прочитане на всички имена\n"
  2164. #: ldlang.c:7602
  2165. msgid "%F%P: multiple STARTUP files\n"
  2166. @@ -805,11 +805,11 @@ msgstr "%P: грешка при свързване, изтриване на из
  2167. #: ldmain.c:490
  2168. msgid "%F%P: %pB: final close failed: %E\n"
  2169. -msgstr "%F%P: %pB: пропадна заключителното затваряне: %E\n"
  2170. +msgstr "%F%P: %pB: не успя заключителното затваряне: %E\n"
  2171. #: ldmain.c:517
  2172. msgid "%F%P: unable to open for source of copy `%s'\n"
  2173. -msgstr "%F%P: не можа да се отвори източника на копието '%s'\n"
  2174. +msgstr "%F%P: не можа да се отвори източникът на копието '%s'\n"
  2175. #: ldmain.c:520
  2176. msgid "%F%P: unable to open for destination of copy `%s'\n"
  2177. @@ -1017,7 +1017,7 @@ msgstr "%P: вътрешна грешка: прекратяване на %s:%d\n
  2178. #: ldmisc.c:703
  2179. msgid "%F%P: please report this bug\n"
  2180. -msgstr "%F%P: моля, рапортувайте този проблем\n"
  2181. +msgstr "%F%P: моля, докладвайте този проблем\n"
  2182. #. Output for noisy == 2 is intended to follow the GNU standards.
  2183. #: ldver.c:37
  2184. @@ -1048,7 +1048,7 @@ msgstr " Поддържани подражавания:\n"
  2185. #: ldwrite.c:60 ldwrite.c:206 ldwrite.c:258 ldwrite.c:299
  2186. msgid "%F%P: bfd_new_link_order failed\n"
  2187. -msgstr "%F%P: пропадна bfd_new_link_order\n"
  2188. +msgstr "%F%P: bfd_new_link_order не успя\n"
  2189. #: ldwrite.c:368
  2190. msgid "%F%P: cannot create split section name for %s\n"
  2191. @@ -1056,7 +1056,7 @@ msgstr "%F%P: при разцепване на раздел, не можа да
  2192. #: ldwrite.c:380
  2193. msgid "%F%P: clone section failed: %E\n"
  2194. -msgstr "%F%P: пропадна копирането на раздел: %E\n"
  2195. +msgstr "%F%P: не успя раздвояването на раздел: %E\n"
  2196. #: ldwrite.c:418
  2197. #, c-format
  2198. @@ -1065,7 +1065,7 @@ msgstr "%8x други\n"
  2199. #: ldwrite.c:588
  2200. msgid "%F%P: final link failed: %E\n"
  2201. -msgstr "%F%P: пропадна заключителното свързване: %E\n"
  2202. +msgstr "%F%P: не успя заключителното свързване: %E\n"
  2203. #: lexsup.c:102 lexsup.c:276
  2204. msgid "KEYWORD"
  2205. @@ -1490,7 +1490,7 @@ msgstr ""
  2206. #: lexsup.c:350
  2207. msgid "Set default hash table size close to <NUMBER>"
  2208. -msgstr "Установява размер по подразбиране на таблицат за хеш близък до <ЧИСЛО>"
  2209. +msgstr "Установява размер, по подразбиране, на речника близък до <ЧИСЛО>"
  2210. #: lexsup.c:353
  2211. msgid "Print option help"
  2212. @@ -1776,15 +1776,15 @@ msgstr "Предупреждение, ако споделен обект съд
  2213. #: lexsup.c:518
  2214. msgid "Warn if an object has alternate ELF machine code"
  2215. -msgstr "Предупреждение ако обекта е с друг ELF ELF код за машина"
  2216. +msgstr "Предупреждение, ако обекта е с друг ELF код за машина"
  2217. #: lexsup.c:522
  2218. msgid "Report unresolved symbols as warnings"
  2219. -msgstr "Рапортуване като предупреждения, на несвързани имена"
  2220. +msgstr "Докладване на несвързани имена като предупреждения"
  2221. #: lexsup.c:525
  2222. msgid "Report unresolved symbols as errors"
  2223. -msgstr "Рапортуване, като грешки, на несвързани имена"
  2224. +msgstr "Докладване на несвързани имена като грешки"
  2225. #: lexsup.c:527
  2226. msgid "Include all objects from following archives"
  2227. @@ -2332,12 +2332,12 @@ msgstr "%X%P: не може да се създаде раздел .reloc: %E\n"
  2228. #: pe-dll.c:1100
  2229. #, c-format
  2230. msgid "%X%P: error: ordinal used twice: %d (%s vs %s)\n"
  2231. -msgstr "%X%P: грешка, номера е използван два пъти: %d (%s с/у %s)\n"
  2232. +msgstr "%X%P: грешка, номерът е използван два пъти: %d (%s с/у %s)\n"
  2233. #: pe-dll.c:1136
  2234. #, c-format
  2235. msgid "%X%P: error: export ordinal too large: %d\n"
  2236. -msgstr "%X%P: грешка: номера е твърде голям: %d\n"
  2237. +msgstr "%X%P: грешка: номерът е твърде голям: %d\n"
  2238. #: pe-dll.c:1452
  2239. #, c-format
  2240. @@ -2346,7 +2346,7 @@ msgstr "Сведение: разрешаване на %s със свързван
  2241. #: pe-dll.c:1458
  2242. msgid "%P: warning: auto-importing has been activated without --enable-auto-import specified on the command line; this should work unless it involves constant data structures referencing symbols from auto-imported DLLs\n"
  2243. -msgstr "%P: предупреждение: автоматично внасяне е задействано без да се зададе --enable-auto-import на командния ред.Това работи, освен ако не е свързано с константни структури за данни, които указват към имена от автоматично внасяни DLL-ли.\n"
  2244. +msgstr "%P: предупреждение: автоматично внасяне е задействано без да се зададе --enable-auto-import на командния ред. Това работи, освен ако не е свързано с константни структури за данни, които указват към имена от автоматично внасяни DLL-ли.\n"
  2245. #. Huh? Shouldn't happen, but punt if it does.
  2246. #: pe-dll.c:1527
  2247. @@ -2370,7 +2370,7 @@ msgstr "; липсва съдържание\n"
  2248. #: pe-dll.c:2780
  2249. msgid "%X%P: %C: variable '%pT' can't be auto-imported; please read the documentation for ld's --enable-auto-import for details\n"
  2250. -msgstr "%X%P: %C: променливата '%pT' не може да се внесе автоматично. Да се прочете в документацията на свързващата програма за повече сведения относно --enable-auto-import.\n"
  2251. +msgstr "%X%P: %C: променливата '%pT' не може да се внесе автоматично. Да се провери в документацията на свързващата програма за повече сведения относно --enable-auto-import.\n"
  2252. #: pe-dll.c:2807
  2253. #, c-format
  2254. @@ -2469,7 +2469,7 @@ msgstr "%F%P: приставката не можа да задели памет
  2255. #: plugin.c:1138
  2256. msgid "%F%P: %s: plugin reported error claiming file\n"
  2257. -msgstr "%F%P: %s: приставката рапортува грешка, при твърденията за файла\n"
  2258. +msgstr "%F%P: %s: приставката отчете грешка при твърденията за файла\n"
  2259. #: plugin.c:1248
  2260. msgid "%P: %s: error in plugin cleanup: %d (ignored)\n"
  2261. @@ -2547,7 +2547,7 @@ msgstr "%P: %s: грешка при почистване на приставка
  2262. #: eshlelf_nto.c:81 eshlelf_vxworks.c:81 ev850.c:81 ev850_rh850.c:81
  2263. #: exgateelf.c:81
  2264. msgid "%F%P: map sections to segments failed: %E\n"
  2265. -msgstr "%F%P: пропадна свързването на раздел към част: %E\n"
  2266. +msgstr "%F%P: не успя свързването на раздел към част: %E\n"
  2267. #: eaarch64cloudabi.c:101 eaarch64cloudabib.c:101 eaarch64elf.c:101
  2268. #: eaarch64elf32.c:101 eaarch64elf32b.c:101 eaarch64elfb.c:101
  2269. @@ -5051,31 +5051,31 @@ msgstr "%F%P: не се чете %s\n"
  2270. #: eaix5ppc.c:390 eaix5rs6.c:390 eaixppc.c:390 eaixrs6.c:390 eppcmacos.c:390
  2271. msgid "%P: warning: ignoring invalid -D number %s\n"
  2272. -msgstr "%P: предупреждение: изоставяне на неправилно число за -D %s\n"
  2273. +msgstr "%P: предупреждение: пропускане на неправилно число за -D %s\n"
  2274. #: eaix5ppc.c:398 eaix5rs6.c:398 eaixppc.c:398 eaixrs6.c:398 eppcmacos.c:398
  2275. msgid "%P: warning: ignoring invalid -H number %s\n"
  2276. -msgstr "%P: предупреждение: изоставяне на неправилно число за -H %s\n"
  2277. +msgstr "%P: предупреждение: пропускане на неправилно число за -H %s\n"
  2278. #: eaix5ppc.c:510 eaix5rs6.c:510 eaixppc.c:510 eaixrs6.c:510 eppcmacos.c:510
  2279. msgid "%P: warning: ignoring invalid -bmaxdata number %s\n"
  2280. -msgstr "%P: предупреждение: изоставяне на неправилно число за -bmaxdata %s\n"
  2281. +msgstr "%P: предупреждение: пропускане на неправилно число за -bmaxdata %s\n"
  2282. #: eaix5ppc.c:519 eaix5rs6.c:519 eaixppc.c:519 eaixrs6.c:519 eppcmacos.c:519
  2283. msgid "%P: warning: ignoring invalid -bmaxstack number %s\n"
  2284. -msgstr "%P: предупреждение: изоставяне на неправилно число за -bmaxstack %s\n"
  2285. +msgstr "%P: предупреждение: пропускане на неправилно число за -bmaxstack %s\n"
  2286. #: eaix5ppc.c:532 eaix5rs6.c:532 eaixppc.c:532 eaixrs6.c:532 eppcmacos.c:532
  2287. msgid "%P: warning: ignoring invalid module type %s\n"
  2288. -msgstr "%P: предупреждение: изоставяне на неправиен тип на модул %s\n"
  2289. +msgstr "%P: предупреждение: пропускане на неправиен тип на модул %s\n"
  2290. #: eaix5ppc.c:562 eaix5rs6.c:562 eaixppc.c:562 eaixrs6.c:562 eppcmacos.c:562
  2291. msgid "%P: warning: ignoring invalid -pD number %s\n"
  2292. -msgstr "%P: предупреждение: изоставяне на неправилно число за -pD %s\n"
  2293. +msgstr "%P: предупреждение: пропускане на неправилно число за -pD %s\n"
  2294. #: eaix5ppc.c:585 eaix5rs6.c:585 eaixppc.c:585 eaixrs6.c:585 eppcmacos.c:585
  2295. msgid "%P: warning: ignoring invalid -pT number %s\n"
  2296. -msgstr "%P: предупреждение: изоставяне на неправилно число за -pT %s\n"
  2297. +msgstr "%P: предупреждение: пропускане на неправилно число за -pT %s\n"
  2298. #: eaix5ppc.c:714 eaix5rs6.c:714 eaixppc.c:714 eaixrs6.c:714 eppcmacos.c:714
  2299. msgid "%F%P: bfd_xcoff_link_record_set failed: %E\n"
  2300. @@ -5252,7 +5252,7 @@ msgstr " --[no-]leading-underscore Изрично установява
  2301. #: emcorepe.c:392 eppcpe.c:392 eshpe.c:392
  2302. #, c-format
  2303. msgid " --thumb-entry=<symbol> Set the entry point to be Thumb <symbol>\n"
  2304. -msgstr " --thumb-entry=<знак> Установяване на входяща точка да е отбелязания <знак>\n"
  2305. +msgstr " --thumb-entry=<знак> Установяване на входяща точка на отбелязания <знак>\n"
  2306. #: earm_wince_pe.c:393 earmpe.c:393 ei386pe.c:393 ei386pe_posix.c:393
  2307. #: emcorepe.c:393 eppcpe.c:393 eshpe.c:393
  2308. @@ -5264,7 +5264,7 @@ msgstr " --[no-]insert-timestamp Използва истинска
  2309. #: ei386pep.c:375 emcorepe.c:394 eppcpe.c:394 eshpe.c:394
  2310. #, c-format
  2311. msgid " This makes binaries non-deterministic\n"
  2312. -msgstr " Това прави двоичните файлове неопределяеми\n"
  2313. +msgstr " Това прави двоичните файлове несравними\n"
  2314. #: earm_wince_pe.c:396 earmpe.c:396 ei386pe.c:396 ei386pe_posix.c:396
  2315. #: ei386pep.c:377 emcorepe.c:396 eppcpe.c:396 eshpe.c:396
  2316. @@ -5440,7 +5440,7 @@ msgid ""
  2317. " greater than 2 gigabytes\n"
  2318. msgstr ""
  2319. " --large-address-aware Програмата поддържа виртуални адреси\n"
  2320. -" по-голями от 2 гигабайта\n"
  2321. +" по-големи от 2 гигабайта\n"
  2322. #: earm_wince_pe.c:420 earmpe.c:420 ei386pe.c:420 ei386pe_posix.c:420
  2323. #: emcorepe.c:420 eppcpe.c:420 eshpe.c:420
  2324. @@ -5450,7 +5450,7 @@ msgid ""
  2325. " addresses greater than 2 gigabytes\n"
  2326. msgstr ""
  2327. " --disable-large-address-aware Програмата не поддържа виртуални\n"
  2328. -" адреси по-голями от 2 гигабайта\n"
  2329. +" адреси по-големи от 2 гигабайта\n"
  2330. #: earm_wince_pe.c:421 earmpe.c:421 ei386pe.c:421 ei386pe_posix.c:421
  2331. #: ei386pep.c:399 emcorepe.c:421 eppcpe.c:421 eshpe.c:421
  2332. @@ -5479,7 +5479,7 @@ msgid ""
  2333. " --dynamicbase Image base address may be relocated using\n"
  2334. " address space layout randomization (ASLR)\n"
  2335. msgstr ""
  2336. -" --dynamicbase Основния адрес на образа може да бъде преместен\n"
  2337. +" --dynamicbase Основният адрес на образа може да бъде преместен\n"
  2338. " като се използва случаен адрес\n"
  2339. #: earm_wince_pe.c:424 earmpe.c:424 ei386pe.c:424 ei386pe_posix.c:424
  2340. @@ -5492,13 +5492,13 @@ msgstr " --forceinteg Налагане на проверка за
  2341. #: ei386pep.c:404 emcorepe.c:425 eppcpe.c:425 eshpe.c:425
  2342. #, c-format
  2343. msgid " --nxcompat Image is compatible with data execution prevention\n"
  2344. -msgstr " --nxcompat Образа е съвместим с предотвратяване на изпълнение на данни\n"
  2345. +msgstr " --nxcompat Образът е съвместим с предотвратяване на изпълнение на данни\n"
  2346. #: earm_wince_pe.c:426 earmpe.c:426 ei386pe.c:426 ei386pe_posix.c:426
  2347. #: ei386pep.c:405 emcorepe.c:426 eppcpe.c:426 eshpe.c:426
  2348. #, c-format
  2349. msgid " --no-isolation Image understands isolation but do not isolate the image\n"
  2350. -msgstr " --no-isolation Образа поддържа изолиране, но да не се изолира\n"
  2351. +msgstr " --no-isolation Образът поддържа изолиране, но да не се изолира\n"
  2352. #: earm_wince_pe.c:427 earmpe.c:427 ei386pe.c:427 ei386pe_posix.c:427
  2353. #: emcorepe.c:427 eppcpe.c:427 eshpe.c:427
  2354. @@ -5507,7 +5507,7 @@ msgid ""
  2355. " --no-seh Image does not use SEH. No SE handler may\n"
  2356. " be called in this image\n"
  2357. msgstr ""
  2358. -" --no-seh Образа не използва SEH. В този образ не\n"
  2359. +" --no-seh Образът не използва SEH. В този образ не\n"
  2360. " може да се извиква SE подръжка\n"
  2361. #: earm_wince_pe.c:428 earmpe.c:428 ei386pe.c:428 ei386pe_posix.c:428
  2362. @@ -5526,7 +5526,7 @@ msgstr " --wdmdriver Използване на WDM модел з
  2363. #: ei386pep.c:409 emcorepe.c:430 eppcpe.c:430 eshpe.c:430
  2364. #, c-format
  2365. msgid " --tsaware Image is Terminal Server aware\n"
  2366. -msgstr " --tsaware Образа поддържа \"Terminal Server\"\n"
  2367. +msgstr " --tsaware Образът поддържа \"Terminal Server\"\n"
  2368. #: earm_wince_pe.c:431 earmpe.c:431 ei386pe.c:431 ei386pe_posix.c:431
  2369. #: ei386pep.c:410 emcorepe.c:431 eppcpe.c:431 eshpe.c:431
  2370. @@ -5603,7 +5603,7 @@ msgstr ""
  2371. #: earm_wince_pe.c:1302 earmpe.c:1302 ei386pe.c:1302 ei386pe_posix.c:1302
  2372. #: ei386pep.c:1305 emcorepe.c:1302 eppcpe.c:1302 eshpe.c:1302
  2373. msgid "%F%P: cannot perform PE operations on non PE output file '%pB'\n"
  2374. -msgstr "%F%P: не може да се извърши \"PE\"-операции на изходен файл '%pB', който не е \"PE\"\n"
  2375. +msgstr "%F%P: не може да се извършат \"PE\"-операции на изходен файл '%pB', който не е \"PE\"\n"
  2376. #: earm_wince_pe.c:1442 earmpe.c:1442 ei386pe.c:1442 ei386pe_posix.c:1442
  2377. #: ei386pep.c:1426 emcorepe.c:1442 eppcpe.c:1442 eshpe.c:1442
  2378. @@ -5649,7 +5649,7 @@ msgstr "%P: предупреждение: '--thumb-entry %s' прегазва '-
  2379. #: earmnto.c:577 earmpe.c:1876 earmsymbian.c:577 ei386pe.c:1876
  2380. #: ei386pe_posix.c:1876 emcorepe.c:1876 eppcpe.c:1876 eshpe.c:1876
  2381. msgid "%P: warning: cannot find thumb start symbol %s\n"
  2382. -msgstr "%P: предупреждение: не е намерен, като начален, отбелязания знак %s\n"
  2383. +msgstr "%P: предупреждение: не е намерен, като начален, отбелязаният знак %s\n"
  2384. #: earmelf.c:603 earmelf_fbsd.c:603 earmelf_fuchsia.c:603 earmelf_linux.c:603
  2385. #: earmelf_linux_eabi.c:603 earmelf_linux_fdpiceabi.c:603 earmelf_nacl.c:603
  2386. @@ -5700,7 +5700,7 @@ msgstr "%P: неразпознат вид STM32L4XX поправка '%s'\n"
  2387. #: earmelfb_nacl.c:2851 earmelfb_nbsd.c:2851 earmnto.c:2826 earmsymbian.c:2851
  2388. #, c-format
  2389. msgid " --thumb-entry=<sym> Set the entry point to be Thumb symbol <sym>\n"
  2390. -msgstr " --thumb-entry=<знак> Установява входяща точка да е отбелязания <знак>\n"
  2391. +msgstr " --thumb-entry=<знак> Установява входяща точка на отбелязания <знак>\n"
  2392. #: earmelf.c:2852 earmelf_fbsd.c:2859 earmelf_fuchsia.c:2852
  2393. #: earmelf_linux.c:2852 earmelf_linux_eabi.c:2852
  2394. @@ -6667,7 +6667,7 @@ msgstr ""
  2395. #: eelf32xtensa.c:561
  2396. msgid "%F%P: failed to create .xtensa.info section\n"
  2397. -msgstr "%F%P: пропадна създаването на раздел .xtensa.info\n"
  2398. +msgstr "%F%P: не успя създаването на раздел .xtensa.info\n"
  2399. #: eelf32xtensa.c:4073
  2400. #, c-format
  2401. @@ -6945,7 +6945,7 @@ msgid ""
  2402. " --no-seh Image does not use SEH; no SE handler may\n"
  2403. " be called in this image\n"
  2404. msgstr ""
  2405. -" --no-seh Образа не използва SEH. В този образ не може\n"
  2406. +" --no-seh Образът не използва SEH. В този образ не може\n"
  2407. " да се извиква SE подръжка\n"
  2408. #: ei386pep.c:908
  2409. diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp
  2410. index 1bbc064857..3912ef1cdd 100644
  2411. --- a/ld/testsuite/ld-aarch64/aarch64-elf.exp
  2412. +++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp
  2413. @@ -86,6 +86,7 @@ run_ld_link_tests $aarch64elftests
  2414. run_ld_link_tests eh-frame-merge-lp64
  2415. run_dump_test "erratum843419"
  2416. +run_dump_test "erratum843419_tls_ie"
  2417. # Relocation Tests
  2418. run_dump_test_lp64 "weak-undefined"
  2419. diff --git a/ld/testsuite/ld-aarch64/erratum843419_tls_ie.d b/ld/testsuite/ld-aarch64/erratum843419_tls_ie.d
  2420. new file mode 100644
  2421. index 0000000000..eba5a20217
  2422. --- /dev/null
  2423. +++ b/ld/testsuite/ld-aarch64/erratum843419_tls_ie.d
  2424. @@ -0,0 +1,49 @@
  2425. +#source: erratum843419_tls_ie.s
  2426. +#as:
  2427. +#ld: --fix-cortex-a53-843419 -e0 --section-start .e843419=0x20000000 -Ttext=0x400000 -Tdata=0x40000000
  2428. +#objdump: -dr
  2429. +#...
  2430. +
  2431. +Disassembly of section .e843419:
  2432. +
  2433. +0*20000000 <farbranch>:
  2434. +[ ]*20000000: d10043ff sub sp, sp, #0x10
  2435. +[ ]*20000004: d28001a7 mov x7, #0xd // #13
  2436. +[ ]*20000008: b9000fe7 str w7, \[sp, #12\]
  2437. +[ ]*2000000c: 140003fb b 20000ff8 <e843419>
  2438. + ...
  2439. +
  2440. +0*20000ff8 <e843419>:
  2441. +[ ]*20000ff8: d2a00000 movz x0, #0x0, lsl #16
  2442. +[ ]*20000ffc: f800c007 stur x7, \[x0, #12\]
  2443. +[ ]*20001000: d2800128 mov x8, #0x9 // #9
  2444. +[ ]*20001004: f2800208 movk x8, #0x10
  2445. +[ ]*20001008: 8b050020 add x0, x1, x5
  2446. +[ ]*2000100c: b9400fe7 ldr w7, \[sp, #12\]
  2447. +[ ]*20001010: 0b0700e0 add w0, w7, w7
  2448. +[ ]*20001014: 910043ff add sp, sp, #0x10
  2449. +[ ]*20001018: d65f03c0 ret
  2450. +[ ]*2000101c: 00000000 .inst 0x00000000 ; undefined
  2451. +[ ]*20001020: 14000400 b 20002020 <e843419\+0x1028>
  2452. +[ ]*20001024: d503201f nop
  2453. +[ ]*20001028: 00000000 .inst 0x00000000 ; undefined
  2454. +[ ]*2000102c: 17fffff7 b 20001008 <e843419\+0x10>
  2455. + ...
  2456. +
  2457. +Disassembly of section .text:
  2458. +
  2459. +0*400000 <main>:
  2460. +[ ]*400000: d10043ff sub sp, sp, #0x10
  2461. +[ ]*400004: d28001a7 mov x7, #0xd // #13
  2462. +[ ]*400008: b9000fe7 str w7, \[sp, #12\]
  2463. +[ ]*40000c: 14000005 b 400020 <__farbranch_veneer>
  2464. +[ ]*400010: d65f03c0 ret
  2465. +[ ]*400014: d503201f nop
  2466. +[ ]*400018: 14000400 b 401018 <__farbranch_veneer\+0xff8>
  2467. +[ ]*40001c: d503201f nop
  2468. +
  2469. +0*400020 <__farbranch_veneer>:
  2470. +[ ]*400020: 900fe010 adrp x16, 20000000 <farbranch>
  2471. +[ ]*400024: 91000210 add x16, x16, #0x0
  2472. +[ ]*400028: d61f0200 br x16
  2473. + ...
  2474. diff --git a/ld/testsuite/ld-aarch64/erratum843419_tls_ie.s b/ld/testsuite/ld-aarch64/erratum843419_tls_ie.s
  2475. new file mode 100644
  2476. index 0000000000..60322445c5
  2477. --- /dev/null
  2478. +++ b/ld/testsuite/ld-aarch64/erratum843419_tls_ie.s
  2479. @@ -0,0 +1,43 @@
  2480. + .text
  2481. + .align 2
  2482. + .global main
  2483. + .type main, %function
  2484. +main:
  2485. + sub sp, sp, #16
  2486. + mov x7, 13
  2487. + str w7, [sp,12]
  2488. + b farbranch
  2489. + ret
  2490. + .size main, .-main
  2491. +
  2492. + .section .e843419, "xa"
  2493. + .align 2
  2494. + .global farbranch
  2495. + .type farbranch, %function
  2496. +farbranch:
  2497. + sub sp, sp, #16
  2498. + mov x7, 13
  2499. + str w7, [sp,12]
  2500. + b e843419
  2501. + .fill 4072,1,0
  2502. +e843419:
  2503. + adrp x0, :gottprel:l_tlsievar
  2504. + str x7, [x0,12]
  2505. + mov x8, 9
  2506. + str x8, [x0, :gottprel_lo12:l_tlsievar]
  2507. +
  2508. + add x0, x1, x5
  2509. + ldr w7, [sp,12]
  2510. + add w0, w7, w7
  2511. + add sp, sp, 16
  2512. + ret
  2513. + .size farbranch, .-farbranch
  2514. +
  2515. +# ---
  2516. +
  2517. + .section .tbss,"awT",%nobits
  2518. + .align 2
  2519. + .type l_tlsievar, %object
  2520. + .size l_tlsievar, 4
  2521. +l_tlsievar:
  2522. + .zero 4
  2523. diff --git a/ld/testsuite/ld-aarch64/ifunc-1-local.d b/ld/testsuite/ld-aarch64/ifunc-1-local.d
  2524. index bcba0aa025..1783637865 100644
  2525. --- a/ld/testsuite/ld-aarch64/ifunc-1-local.d
  2526. +++ b/ld/testsuite/ld-aarch64/ifunc-1-local.d
  2527. @@ -3,7 +3,7 @@
  2528. #target: aarch64*-*-*
  2529. #...
  2530. -0+(110|180) <__GI_foo>:
  2531. +0+(110|180|1a0) <(__GI_)?foo>:
  2532. #...
  2533. -[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+(0x110|0x180)@plt>
  2534. +[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+(0x110|0x180|0x1a0)@plt>
  2535. #pass
  2536. diff --git a/ld/testsuite/ld-aarch64/ifunc-1.d b/ld/testsuite/ld-aarch64/ifunc-1.d
  2537. index f408bfff78..0274ac0094 100644
  2538. --- a/ld/testsuite/ld-aarch64/ifunc-1.d
  2539. +++ b/ld/testsuite/ld-aarch64/ifunc-1.d
  2540. @@ -3,7 +3,7 @@
  2541. #target: aarch64*-*-*
  2542. #...
  2543. -0+(130|1a0) <foo>:
  2544. +0+(130|1a0|1c8) <foo>:
  2545. #...
  2546. -[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(130|1a0)@plt>
  2547. +[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(130|1a0|1c8)@plt>
  2548. #pass
  2549. diff --git a/ld/testsuite/ld-aarch64/ifunc-2-local.d b/ld/testsuite/ld-aarch64/ifunc-2-local.d
  2550. index fb1bb40e38..a3d9e15f8b 100644
  2551. --- a/ld/testsuite/ld-aarch64/ifunc-2-local.d
  2552. +++ b/ld/testsuite/ld-aarch64/ifunc-2-local.d
  2553. @@ -3,9 +3,9 @@
  2554. #target: aarch64*-*-*
  2555. #...
  2556. -0+(110|180) <__GI_foo>:
  2557. +0+(110|180|1a0) <__GI_foo>:
  2558. #...
  2559. -[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(110|180)@plt>
  2560. +[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(110|180|1a0)@plt>
  2561. [ \t0-9a-f]+:[ \t0-9a-f]+adrp[ \t]+x0, 0 <.*>
  2562. -[ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+x0, x0, #0x(100|170)
  2563. +[ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+x0, x0, #0x(100|170|190)
  2564. #pass
  2565. diff --git a/ld/testsuite/ld-aarch64/ifunc-2.d b/ld/testsuite/ld-aarch64/ifunc-2.d
  2566. index 16c75ead40..eb6fa0ccf0 100644
  2567. --- a/ld/testsuite/ld-aarch64/ifunc-2.d
  2568. +++ b/ld/testsuite/ld-aarch64/ifunc-2.d
  2569. @@ -3,9 +3,9 @@
  2570. #target: aarch64*-*-*
  2571. #...
  2572. -0+(130|1a0) <foo>:
  2573. +0+(130|1a0|1c8) <foo>:
  2574. #...
  2575. -[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(130|1a0)@plt>
  2576. +[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(130|1a0|1c8)@plt>
  2577. [ \t0-9a-f]+:[ \t0-9a-f]+adrp[ \t]+x0, 0 <.*>
  2578. -[ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+x0, x0, #0x(120|190)
  2579. +[ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+x0, x0, #0x(120|190|1b8)
  2580. #pass
  2581. diff --git a/ld/testsuite/ld-aarch64/ifunc-21.d b/ld/testsuite/ld-aarch64/ifunc-21.d
  2582. index b501bd6712..a16186b587 100644
  2583. --- a/ld/testsuite/ld-aarch64/ifunc-21.d
  2584. +++ b/ld/testsuite/ld-aarch64/ifunc-21.d
  2585. @@ -11,7 +11,7 @@ Contents of section .text:
  2586. [0-9a-f]+ .*
  2587. Contents of section .got.plt:
  2588. [0-9a-f]+ 0+ 0+ 0+ 0+ .*
  2589. - 10298 0+ 0+ [0-9a-f]+ [0-9a-f]+ .*
  2590. + (10298|102b8) 0+ 0+ [0-9a-f]+ [0-9a-f]+ .*
  2591. Disassembly of section .text:
  2592. @@ -20,7 +20,7 @@ Disassembly of section .text:
  2593. .* <bar>:
  2594. .*: 90000080 adrp x0, 10000 <.*>
  2595. - .*: .* ldr x0, \[x0, #672\]
  2596. + .*: .* ldr x0, \[x0, #(672|704)\]
  2597. .*: d65f03c0 ret
  2598. #pass
  2599. diff --git a/ld/testsuite/ld-aarch64/ifunc-3a.d b/ld/testsuite/ld-aarch64/ifunc-3a.d
  2600. index a01a75c904..4919d96892 100644
  2601. --- a/ld/testsuite/ld-aarch64/ifunc-3a.d
  2602. +++ b/ld/testsuite/ld-aarch64/ifunc-3a.d
  2603. @@ -4,7 +4,7 @@
  2604. #target: aarch64*-*-*
  2605. #...
  2606. -0+(150|1d0) <__GI_foo>:
  2607. +0+(150|1d0|1e8) <__GI_foo>:
  2608. #...
  2609. -[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(150|1d0)@plt>
  2610. +[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(150|1d0|1e8)@plt>
  2611. #pass
  2612. diff --git a/ld/testsuite/ld-aarch64/ifunc-9.d b/ld/testsuite/ld-aarch64/ifunc-9.d
  2613. index 3b4e995254..e921591275 100644
  2614. --- a/ld/testsuite/ld-aarch64/ifunc-9.d
  2615. +++ b/ld/testsuite/ld-aarch64/ifunc-9.d
  2616. @@ -1,3 +1,4 @@
  2617. #ld: --export-dynamic
  2618. -#error: .*dynamic STT_GNU_IFUNC symbol `foo' with pointer equality in `.*.o' can not be used when making an executable; recompile with -fPIE and relink with -pie
  2619. +#objdump: -dr
  2620. #target: aarch64*-*-*
  2621. +#...
  2622. diff --git a/ld/testsuite/ld-elf/dummy.s b/ld/testsuite/ld-elf/dummy.s
  2623. new file mode 100644
  2624. index 0000000000..403f98000d
  2625. --- /dev/null
  2626. +++ b/ld/testsuite/ld-elf/dummy.s
  2627. @@ -0,0 +1 @@
  2628. +# Dummy
  2629. diff --git a/ld/testsuite/ld-elf/linux-x86.S b/ld/testsuite/ld-elf/linux-x86.S
  2630. new file mode 100644
  2631. index 0000000000..d94abc1106
  2632. --- /dev/null
  2633. +++ b/ld/testsuite/ld-elf/linux-x86.S
  2634. @@ -0,0 +1,91 @@
  2635. + .text
  2636. + .globl _start
  2637. + .type _start,@function
  2638. + .p2align 4
  2639. +_start:
  2640. + xorl %ebp, %ebp
  2641. +#ifdef __LP64__
  2642. + popq %rdi
  2643. + movq %rsp, %rsi
  2644. + andq $~15, %rsp
  2645. +#elif defined __x86_64__
  2646. + mov (%rsp),%edi
  2647. + addl $4,%esp
  2648. + movl %esp, %esi
  2649. + andl $~15, %esp
  2650. +#else
  2651. + popl %esi
  2652. + movl %esp, %ecx
  2653. + andl $~15, %esp
  2654. +
  2655. + subl $8,%esp
  2656. + pushl %ecx
  2657. + pushl %esi
  2658. +#endif
  2659. +
  2660. + call main
  2661. +
  2662. + hlt
  2663. +
  2664. + .type syscall, @function
  2665. + .globl syscall
  2666. + .p2align 4
  2667. +syscall:
  2668. +#ifdef __x86_64__
  2669. + movq %rdi, %rax /* Syscall number -> rax. */
  2670. + movq %rsi, %rdi /* shift arg1 - arg5. */
  2671. + movq %rdx, %rsi
  2672. + movq %rcx, %rdx
  2673. + movq %r8, %r10
  2674. + movq %r9, %r8
  2675. + movq 8(%rsp),%r9 /* arg6 is on the stack. */
  2676. + syscall /* Do the system call. */
  2677. +#else
  2678. + push %ebp
  2679. + push %edi
  2680. + push %esi
  2681. + push %ebx
  2682. + mov 0x2c(%esp),%ebp
  2683. + mov 0x28(%esp),%edi
  2684. + mov 0x24(%esp),%esi
  2685. + mov 0x20(%esp),%edx
  2686. + mov 0x1c(%esp),%ecx
  2687. + mov 0x18(%esp),%ebx
  2688. + mov 0x14(%esp),%eax
  2689. + int $0x80
  2690. + pop %ebx
  2691. + pop %esi
  2692. + pop %edi
  2693. + pop %ebp
  2694. +#endif
  2695. + ret /* Return to caller. */
  2696. + .size syscall, .-syscall
  2697. + .section .note.GNU-stack,"",@progbits
  2698. +
  2699. + .section ".note.gnu.property", "a"
  2700. +#ifdef __LP64__
  2701. + .p2align 3
  2702. +#else
  2703. + .p2align 2
  2704. +#endif
  2705. + .long 1f - 0f /* name length */
  2706. + .long 5f - 2f /* data length */
  2707. + .long 5 /* note type */
  2708. +0: .asciz "GNU" /* vendor name */
  2709. +1:
  2710. +#ifdef __LP64__
  2711. + .p2align 3
  2712. +#else
  2713. + .p2align 2
  2714. +#endif
  2715. +2: .long 0xc0000002 /* pr_type. */
  2716. + .long 4f - 3f /* pr_datasz. */
  2717. +3:
  2718. + .long 0x2
  2719. +4:
  2720. +#ifdef __LP64__
  2721. + .p2align 3
  2722. +#else
  2723. + .p2align 2
  2724. +#endif
  2725. +5:
  2726. diff --git a/ld/testsuite/ld-elf/linux-x86.exp b/ld/testsuite/ld-elf/linux-x86.exp
  2727. new file mode 100644
  2728. index 0000000000..f6f5a80853
  2729. --- /dev/null
  2730. +++ b/ld/testsuite/ld-elf/linux-x86.exp
  2731. @@ -0,0 +1,46 @@
  2732. +# Expect script for simple native Linux/x86 tests.
  2733. +# Copyright (C) 2018 Free Software Foundation, Inc.
  2734. +#
  2735. +# This file is part of the GNU Binutils.
  2736. +#
  2737. +# This program is free software; you can redistribute it and/or modify
  2738. +# it under the terms of the GNU General Public License as published by
  2739. +# the Free Software Foundation; either version 3 of the License, or
  2740. +# (at your option) any later version.
  2741. +#
  2742. +# This program is distributed in the hope that it will be useful,
  2743. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  2744. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  2745. +# GNU General Public License for more details.
  2746. +#
  2747. +# You should have received a copy of the GNU General Public License
  2748. +# along with this program; if not, write to the Free Software
  2749. +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  2750. +# MA 02110-1301, USA.
  2751. +#
  2752. +
  2753. +# Test very simple native Linux/x86 programs with linux-x86.S.
  2754. +if { ![isnative] || [which $CC] == 0 \
  2755. + || (![istarget "i?86-*-linux*"] \
  2756. + && ![istarget "x86_64-*-linux*"] \
  2757. + && ![istarget "amd64-*-linux*"]) } {
  2758. + return
  2759. +}
  2760. +
  2761. +# Add $PLT_CFLAGS if PLT is expected.
  2762. +global PLT_CFLAGS
  2763. +# Add $NOPIE_CFLAGS and $NOPIE_LDFLAGS if non-PIE is required.
  2764. +global NOPIE_CFLAGS NOPIE_LDFLAGS
  2765. +
  2766. +run_ld_link_exec_tests [list \
  2767. + [list \
  2768. + "Run PR ld/23428 test" \
  2769. + "--no-dynamic-linker -z separate-code" \
  2770. + "" \
  2771. + { linux-x86.S pr23428.c dummy.s } \
  2772. + "pr23428" \
  2773. + "pass.out" \
  2774. + "$NOPIE_CFLAGS -fno-asynchronous-unwind-tables" \
  2775. + "asm" \
  2776. + ] \
  2777. +]
  2778. diff --git a/ld/testsuite/ld-elf/pr23428.c b/ld/testsuite/ld-elf/pr23428.c
  2779. new file mode 100644
  2780. index 0000000000..3631ed7926
  2781. --- /dev/null
  2782. +++ b/ld/testsuite/ld-elf/pr23428.c
  2783. @@ -0,0 +1,43 @@
  2784. +#include <unistd.h>
  2785. +#include <link.h>
  2786. +#include <syscall.h>
  2787. +
  2788. +#define STRING_COMMA_LEN(STR) (STR), (sizeof (STR) - 1)
  2789. +
  2790. +int
  2791. +main (int argc, char **argv)
  2792. +{
  2793. + char **ev = &argv[argc + 1];
  2794. + char **evp = ev;
  2795. + ElfW(auxv_t) *av;
  2796. + const ElfW(Phdr) *phdr = NULL;
  2797. + size_t phnum = 0;
  2798. + size_t loadnum = 0;
  2799. + int fd = STDOUT_FILENO;
  2800. + size_t i;
  2801. +
  2802. + while (*evp++ != NULL)
  2803. + ;
  2804. +
  2805. + av = (ElfW(auxv_t) *) evp;
  2806. +
  2807. + for (; av->a_type != AT_NULL; ++av)
  2808. + switch (av->a_type)
  2809. + {
  2810. + case AT_PHDR:
  2811. + phdr = (const void *) av->a_un.a_val;
  2812. + break;
  2813. + case AT_PHNUM:
  2814. + phnum = av->a_un.a_val;
  2815. + break;
  2816. + }
  2817. +
  2818. + for (i = 0; i < phnum; i++, phdr++)
  2819. + if (phdr->p_type == PT_LOAD)
  2820. + loadnum++;
  2821. +
  2822. + syscall (SYS_write, fd, STRING_COMMA_LEN ("PASS\n"));
  2823. +
  2824. + syscall (SYS_exit, !loadnum);
  2825. + return 0;
  2826. +}
  2827. diff --git a/ld/testsuite/ld-elf/sec64k.exp b/ld/testsuite/ld-elf/sec64k.exp
  2828. index b58139e9dd..3909c0eaa1 100644
  2829. --- a/ld/testsuite/ld-elf/sec64k.exp
  2830. +++ b/ld/testsuite/ld-elf/sec64k.exp
  2831. @@ -177,6 +177,8 @@ if { ![istarget "d10v-*-*"]
  2832. foreach sfile $sfiles { puts $ofd "#source: $sfile" }
  2833. if { [istarget spu*-*-*] } {
  2834. puts $ofd "#ld: --local-store 0:0"
  2835. + } elseif { [istarget "i?86-*-linux*"] || [istarget "x86_64-*-linux*"] } {
  2836. + puts $ofd "#ld: -z noseparate-code"
  2837. } else {
  2838. puts $ofd "#ld:"
  2839. }
  2840. diff --git a/ld/testsuite/ld-i386/abs-iamcu.d b/ld/testsuite/ld-i386/abs-iamcu.d
  2841. index ac9beff2e5..aba7d6b03f 100644
  2842. --- a/ld/testsuite/ld-i386/abs-iamcu.d
  2843. +++ b/ld/testsuite/ld-i386/abs-iamcu.d
  2844. @@ -2,7 +2,7 @@
  2845. #source: abs.s
  2846. #source: zero.s
  2847. #as: --32 -march=iamcu
  2848. -#ld: -m elf_iamcu
  2849. +#ld: -m elf_iamcu -z noseparate-code
  2850. #objdump: -rs -j .text
  2851. .*: file format .*
  2852. diff --git a/ld/testsuite/ld-i386/abs.d b/ld/testsuite/ld-i386/abs.d
  2853. index e660aca524..191ee4456a 100644
  2854. --- a/ld/testsuite/ld-i386/abs.d
  2855. +++ b/ld/testsuite/ld-i386/abs.d
  2856. @@ -2,7 +2,7 @@
  2857. #as: --32
  2858. #source: abs.s
  2859. #source: zero.s
  2860. -#ld: -melf_i386
  2861. +#ld: -melf_i386 -z noseparate-code
  2862. #objdump: -rs
  2863. .*: file format .*
  2864. diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp
  2865. index 6d794fe653..56c95367e1 100644
  2866. --- a/ld/testsuite/ld-i386/i386.exp
  2867. +++ b/ld/testsuite/ld-i386/i386.exp
  2868. @@ -462,6 +462,9 @@ run_dump_test "pr23189"
  2869. run_dump_test "pr23194"
  2870. run_dump_test "pr23372a"
  2871. run_dump_test "pr23372b"
  2872. +run_dump_test "pr23486a"
  2873. +run_dump_test "pr23486b"
  2874. +run_dump_test "pr23854"
  2875. if { !([istarget "i?86-*-linux*"]
  2876. || [istarget "i?86-*-gnu*"]
  2877. diff --git a/ld/testsuite/ld-i386/pr12718.d b/ld/testsuite/ld-i386/pr12718.d
  2878. index ec51540a42..7eba52d95e 100644
  2879. --- a/ld/testsuite/ld-i386/pr12718.d
  2880. +++ b/ld/testsuite/ld-i386/pr12718.d
  2881. @@ -1,6 +1,6 @@
  2882. #name: PR ld/12718
  2883. #as: --32
  2884. -#ld: -melf_i386
  2885. +#ld: -melf_i386 -z noseparate-code
  2886. #readelf: -S
  2887. There are 5 section headers, starting at offset 0x[0-9a-f]+:
  2888. diff --git a/ld/testsuite/ld-i386/pr12921.d b/ld/testsuite/ld-i386/pr12921.d
  2889. index e49079b3c8..ea2da3eb51 100644
  2890. --- a/ld/testsuite/ld-i386/pr12921.d
  2891. +++ b/ld/testsuite/ld-i386/pr12921.d
  2892. @@ -1,6 +1,6 @@
  2893. #name: PR ld/12921
  2894. #as: --32
  2895. -#ld: -melf_i386
  2896. +#ld: -melf_i386 -z noseparate-code
  2897. #readelf: -S --wide
  2898. There are 7 section headers, starting at offset 0x[0-9a-f]+:
  2899. diff --git a/ld/testsuite/ld-i386/pr23486a.d b/ld/testsuite/ld-i386/pr23486a.d
  2900. new file mode 100644
  2901. index 0000000000..41a6dcf7d5
  2902. --- /dev/null
  2903. +++ b/ld/testsuite/ld-i386/pr23486a.d
  2904. @@ -0,0 +1,10 @@
  2905. +#source: ../ld-x86-64/pr23486a.s
  2906. +#source: ../ld-x86-64/pr23486b.s
  2907. +#as: --32
  2908. +#ld: -r -m elf_i386
  2909. +#readelf: -n
  2910. +
  2911. +Displaying notes found in: .note.gnu.property
  2912. + Owner Data size Description
  2913. + GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0
  2914. + Properties: x86 ISA needed: i486, 586
  2915. diff --git a/ld/testsuite/ld-i386/pr23486b.d b/ld/testsuite/ld-i386/pr23486b.d
  2916. new file mode 100644
  2917. index 0000000000..08019b7274
  2918. --- /dev/null
  2919. +++ b/ld/testsuite/ld-i386/pr23486b.d
  2920. @@ -0,0 +1,10 @@
  2921. +#source: ../ld-x86-64/pr23486b.s
  2922. +#source: ../ld-x86-64/pr23486a.s
  2923. +#as: --32
  2924. +#ld: -r -m elf_i386
  2925. +#readelf: -n
  2926. +
  2927. +Displaying notes found in: .note.gnu.property
  2928. + Owner Data size Description
  2929. + GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0
  2930. + Properties: x86 ISA needed: i486, 586
  2931. diff --git a/ld/testsuite/ld-i386/pr23854.d b/ld/testsuite/ld-i386/pr23854.d
  2932. new file mode 100644
  2933. index 0000000000..3ed9c206e5
  2934. --- /dev/null
  2935. +++ b/ld/testsuite/ld-i386/pr23854.d
  2936. @@ -0,0 +1,28 @@
  2937. +#as: --32 -mrelax-relocations=yes
  2938. +#ld: -melf_i386
  2939. +#objdump: -dw
  2940. +
  2941. +.*: +file format .*
  2942. +
  2943. +Disassembly of section .text:
  2944. +
  2945. +[a-f0-9]+ <_start>:
  2946. + +[a-f0-9]+: 66 13 81 f8 ff ff ff adc -0x8\(%ecx\),%ax
  2947. + +[a-f0-9]+: 66 03 99 f8 ff ff ff add -0x8\(%ecx\),%bx
  2948. + +[a-f0-9]+: 66 23 89 f8 ff ff ff and -0x8\(%ecx\),%cx
  2949. + +[a-f0-9]+: 66 3b 91 f8 ff ff ff cmp -0x8\(%ecx\),%dx
  2950. + +[a-f0-9]+: 66 0b b9 f8 ff ff ff or -0x8\(%ecx\),%di
  2951. + +[a-f0-9]+: 66 1b b1 f8 ff ff ff sbb -0x8\(%ecx\),%si
  2952. + +[a-f0-9]+: 66 2b a9 f8 ff ff ff sub -0x8\(%ecx\),%bp
  2953. + +[a-f0-9]+: 66 33 a1 f8 ff ff ff xor -0x8\(%ecx\),%sp
  2954. + +[a-f0-9]+: 66 85 89 f8 ff ff ff test %cx,-0x8\(%ecx\)
  2955. + +[a-f0-9]+: 66 13 81 fc ff ff ff adc -0x4\(%ecx\),%ax
  2956. + +[a-f0-9]+: 66 03 99 fc ff ff ff add -0x4\(%ecx\),%bx
  2957. + +[a-f0-9]+: 66 23 89 fc ff ff ff and -0x4\(%ecx\),%cx
  2958. + +[a-f0-9]+: 66 3b 91 fc ff ff ff cmp -0x4\(%ecx\),%dx
  2959. + +[a-f0-9]+: 66 0b b9 fc ff ff ff or -0x4\(%ecx\),%di
  2960. + +[a-f0-9]+: 66 1b b1 fc ff ff ff sbb -0x4\(%ecx\),%si
  2961. + +[a-f0-9]+: 66 2b a9 fc ff ff ff sub -0x4\(%ecx\),%bp
  2962. + +[a-f0-9]+: 66 33 a1 fc ff ff ff xor -0x4\(%ecx\),%sp
  2963. + +[a-f0-9]+: 66 85 89 fc ff ff ff test %cx,-0x4\(%ecx\)
  2964. +#pass
  2965. diff --git a/ld/testsuite/ld-i386/pr23854.s b/ld/testsuite/ld-i386/pr23854.s
  2966. new file mode 100644
  2967. index 0000000000..565e747be0
  2968. --- /dev/null
  2969. +++ b/ld/testsuite/ld-i386/pr23854.s
  2970. @@ -0,0 +1,33 @@
  2971. + .data
  2972. + .type bar, @object
  2973. +bar:
  2974. + .byte 1
  2975. + .size bar, .-bar
  2976. + .globl foo
  2977. + .type foo, @object
  2978. +foo:
  2979. + .byte 1
  2980. + .size foo, .-foo
  2981. + .text
  2982. + .globl _start
  2983. + .type _start, @function
  2984. +_start:
  2985. + adcw bar@GOT(%ecx), %ax
  2986. + addw bar@GOT(%ecx), %bx
  2987. + andw bar@GOT(%ecx), %cx
  2988. + cmpw bar@GOT(%ecx), %dx
  2989. + orw bar@GOT(%ecx), %di
  2990. + sbbw bar@GOT(%ecx), %si
  2991. + subw bar@GOT(%ecx), %bp
  2992. + xorw bar@GOT(%ecx), %sp
  2993. + testw %cx, bar@GOT(%ecx)
  2994. + adcw foo@GOT(%ecx), %ax
  2995. + addw foo@GOT(%ecx), %bx
  2996. + andw foo@GOT(%ecx), %cx
  2997. + cmpw foo@GOT(%ecx), %dx
  2998. + orw foo@GOT(%ecx), %di
  2999. + sbbw foo@GOT(%ecx), %si
  3000. + subw foo@GOT(%ecx), %bp
  3001. + xorw foo@GOT(%ecx), %sp
  3002. + testw %cx, foo@GOT(%ecx)
  3003. + .size _start, .-_start
  3004. diff --git a/ld/testsuite/ld-i386/property-3.r b/ld/testsuite/ld-i386/property-3.r
  3005. index 0ed91f5922..d03203c1e5 100644
  3006. --- a/ld/testsuite/ld-i386/property-3.r
  3007. +++ b/ld/testsuite/ld-i386/property-3.r
  3008. @@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property
  3009. Owner Data size Description
  3010. GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0
  3011. Properties: stack size: 0x800000
  3012. - x86 ISA used: 586, SSE
  3013. x86 ISA needed: i486, 586
  3014. #pass
  3015. diff --git a/ld/testsuite/ld-i386/property-4.r b/ld/testsuite/ld-i386/property-4.r
  3016. index cb2bc15d9a..da295eb6c7 100644
  3017. --- a/ld/testsuite/ld-i386/property-4.r
  3018. +++ b/ld/testsuite/ld-i386/property-4.r
  3019. @@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property
  3020. Owner Data size Description
  3021. GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0
  3022. Properties: stack size: 0x800000
  3023. - x86 ISA used: i486, 586, SSE
  3024. x86 ISA needed: i486, 586, SSE
  3025. #pass
  3026. diff --git a/ld/testsuite/ld-i386/property-5.r b/ld/testsuite/ld-i386/property-5.r
  3027. index 552965058c..e4141594b3 100644
  3028. --- a/ld/testsuite/ld-i386/property-5.r
  3029. +++ b/ld/testsuite/ld-i386/property-5.r
  3030. @@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property
  3031. Owner Data size Description
  3032. GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0
  3033. Properties: stack size: 0x900000
  3034. - x86 ISA used: i486, 586, SSE
  3035. x86 ISA needed: i486, 586, SSE
  3036. #pass
  3037. diff --git a/ld/testsuite/ld-i386/property-x86-ibt3a.d b/ld/testsuite/ld-i386/property-x86-ibt3a.d
  3038. index 4bb35b00fb..0aedea1614 100644
  3039. --- a/ld/testsuite/ld-i386/property-x86-ibt3a.d
  3040. +++ b/ld/testsuite/ld-i386/property-x86-ibt3a.d
  3041. @@ -6,6 +6,5 @@
  3042. Displaying notes found in: .note.gnu.property
  3043. Owner Data size Description
  3044. - GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0
  3045. - Properties: x86 ISA used: i486, 586, SSE2, SSE3
  3046. - x86 ISA needed: 586, SSE, SSE3, SSE4_1
  3047. + GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0
  3048. + Properties: x86 ISA needed: 586, SSE, SSE3, SSE4_1
  3049. diff --git a/ld/testsuite/ld-i386/property-x86-ibt3b.d b/ld/testsuite/ld-i386/property-x86-ibt3b.d
  3050. index 418d58a8f7..bd69ac6478 100644
  3051. --- a/ld/testsuite/ld-i386/property-x86-ibt3b.d
  3052. +++ b/ld/testsuite/ld-i386/property-x86-ibt3b.d
  3053. @@ -6,6 +6,5 @@
  3054. Displaying notes found in: .note.gnu.property
  3055. Owner Data size Description
  3056. - GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0
  3057. - Properties: x86 ISA used: i486, 586, SSE2, SSE3
  3058. - x86 ISA needed: 586, SSE, SSE3, SSE4_1
  3059. + GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0
  3060. + Properties: x86 ISA needed: 586, SSE, SSE3, SSE4_1
  3061. diff --git a/ld/testsuite/ld-i386/property-x86-shstk3a.d b/ld/testsuite/ld-i386/property-x86-shstk3a.d
  3062. index e261038f60..76d2a39f2c 100644
  3063. --- a/ld/testsuite/ld-i386/property-x86-shstk3a.d
  3064. +++ b/ld/testsuite/ld-i386/property-x86-shstk3a.d
  3065. @@ -6,6 +6,5 @@
  3066. Displaying notes found in: .note.gnu.property
  3067. Owner Data size Description
  3068. - GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0
  3069. - Properties: x86 ISA used: i486, 586, SSE2, SSE3
  3070. - x86 ISA needed: 586, SSE, SSE3, SSE4_1
  3071. + GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0
  3072. + Properties: x86 ISA needed: 586, SSE, SSE3, SSE4_1
  3073. diff --git a/ld/testsuite/ld-i386/property-x86-shstk3b.d b/ld/testsuite/ld-i386/property-x86-shstk3b.d
  3074. index 25f3d2361e..e770ecffa5 100644
  3075. --- a/ld/testsuite/ld-i386/property-x86-shstk3b.d
  3076. +++ b/ld/testsuite/ld-i386/property-x86-shstk3b.d
  3077. @@ -6,6 +6,5 @@
  3078. Displaying notes found in: .note.gnu.property
  3079. Owner Data size Description
  3080. - GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0
  3081. - Properties: x86 ISA used: i486, 586, SSE2, SSE3
  3082. - x86 ISA needed: 586, SSE, SSE3, SSE4_1
  3083. + GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0
  3084. + Properties: x86 ISA needed: 586, SSE, SSE3, SSE4_1
  3085. diff --git a/ld/testsuite/ld-ifunc/ifunc.exp b/ld/testsuite/ld-ifunc/ifunc.exp
  3086. index 612d91402f..86892b96b5 100644
  3087. --- a/ld/testsuite/ld-ifunc/ifunc.exp
  3088. +++ b/ld/testsuite/ld-ifunc/ifunc.exp
  3089. @@ -713,7 +713,7 @@ run_ld_link_exec_tests [list \
  3090. # That does not happen for the pr23169 testcase where the resolver is
  3091. # in the executable (which is relocated last by ld.so).
  3092. if { [isnative]
  3093. - && ![istarget "powerpc-*-*"] } {
  3094. + && !([istarget "powerpc-*-*"] || [istarget "aarch64*-*-*"]) } {
  3095. run_ld_link_exec_tests [list \
  3096. [list \
  3097. "Run pr23169a" \
  3098. diff --git a/ld/testsuite/ld-linkonce/zeroeh.ld b/ld/testsuite/ld-linkonce/zeroeh.ld
  3099. index b22eaa12c9..f89855a08f 100644
  3100. --- a/ld/testsuite/ld-linkonce/zeroeh.ld
  3101. +++ b/ld/testsuite/ld-linkonce/zeroeh.ld
  3102. @@ -2,4 +2,5 @@ SECTIONS {
  3103. .text 0xa00 : { *(.text); *(.gnu.linkonce.t.*) }
  3104. .gcc_except_table 0x2000 : { *(.gcc_except_table) }
  3105. .eh_frame 0x4000 : { *(.eh_frame) }
  3106. + /DISCARD/ : { *(.note.gnu.property) }
  3107. }
  3108. diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
  3109. index 7c50b0f102..4ce74f2587 100644
  3110. --- a/ld/testsuite/ld-plugin/lto.exp
  3111. +++ b/ld/testsuite/ld-plugin/lto.exp
  3112. @@ -219,6 +219,12 @@ set lto_link_tests [list \
  3113. [list "Build pr22751.a" \
  3114. "$plug_opt" "-flto $lto_no_fat $INT128_CFLAGS" \
  3115. {pr22751.c} {} "pr22751.a"] \
  3116. + [list "Build libpr23818.so" \
  3117. + "-shared -flto -g -Wl,-version-script,pr23818.t" \
  3118. + "-g -flto $lto_fat" \
  3119. + {pr23818a.c pr23818b.c} \
  3120. + {{"readelf" {-s --wide} "pr23818.d"}} \
  3121. + "libpr23818.so"] \
  3122. ]
  3123. if { [at_least_gcc_version 4 7] } {
  3124. diff --git a/ld/testsuite/ld-plugin/pr23818.d b/ld/testsuite/ld-plugin/pr23818.d
  3125. new file mode 100644
  3126. index 0000000000..5753cd64fd
  3127. --- /dev/null
  3128. +++ b/ld/testsuite/ld-plugin/pr23818.d
  3129. @@ -0,0 +1,4 @@
  3130. +#failif
  3131. +#...
  3132. +.*0+ +[A-Z]+ +GLOBAL +DEFAULT +ABS foo
  3133. +#...
  3134. diff --git a/ld/testsuite/ld-plugin/pr23818.t b/ld/testsuite/ld-plugin/pr23818.t
  3135. new file mode 100644
  3136. index 0000000000..45bca5580e
  3137. --- /dev/null
  3138. +++ b/ld/testsuite/ld-plugin/pr23818.t
  3139. @@ -0,0 +1,4 @@
  3140. +{
  3141. + global: bar;
  3142. + local: *;
  3143. +};
  3144. diff --git a/ld/testsuite/ld-plugin/pr23818a.c b/ld/testsuite/ld-plugin/pr23818a.c
  3145. new file mode 100644
  3146. index 0000000000..5b5ccbf7cb
  3147. --- /dev/null
  3148. +++ b/ld/testsuite/ld-plugin/pr23818a.c
  3149. @@ -0,0 +1,4 @@
  3150. +void
  3151. +foo ()
  3152. +{
  3153. +}
  3154. diff --git a/ld/testsuite/ld-plugin/pr23818b.c b/ld/testsuite/ld-plugin/pr23818b.c
  3155. new file mode 100644
  3156. index 0000000000..d4be333a39
  3157. --- /dev/null
  3158. +++ b/ld/testsuite/ld-plugin/pr23818b.c
  3159. @@ -0,0 +1,7 @@
  3160. +void foo (void);
  3161. +
  3162. +void
  3163. +bar (void)
  3164. +{
  3165. + foo ();
  3166. +}
  3167. diff --git a/ld/testsuite/ld-powerpc/powerpc.exp b/ld/testsuite/ld-powerpc/powerpc.exp
  3168. index 0359ba28cb..5ec3850787 100644
  3169. --- a/ld/testsuite/ld-powerpc/powerpc.exp
  3170. +++ b/ld/testsuite/ld-powerpc/powerpc.exp
  3171. @@ -221,7 +221,7 @@ set ppc64elftests {
  3172. "tlsopt4"}
  3173. {"TLS DLL" "-shared -melf64ppc --version-script tlsdll.ver" "" "-a64" {tlsdll.s}
  3174. {} "tlsdll.so"}
  3175. - {"TLS opt 5" "-melf64ppc --no-plt-align -shared --gc-sections --no-plt-localentry tmpdir/tlsdll.so" "" "-a64" {tlsopt5.s}
  3176. + {"TLS opt 5" "-melf64ppc -shared --hash-style=both --gc-sections --no-plt-localentry tmpdir/tlsdll.so" "" "-a64" {tlsopt5.s}
  3177. {{objdump -dr tlsopt5.d} {readelf -wf tlsopt5.wf}}
  3178. "tlsopt5"}
  3179. {"sym@tocbase" "-shared -melf64ppc" "" "-a64" {symtocbase-1.s symtocbase-2.s}
  3180. @@ -328,6 +328,7 @@ if [ supports_ppc64 ] then {
  3181. run_dump_test "dotsym2"
  3182. run_dump_test "dotsym3"
  3183. run_dump_test "dotsym4"
  3184. + run_dump_test "pr23937"
  3185. }
  3186. run_dump_test "tlsld32"
  3187. diff --git a/ld/testsuite/ld-powerpc/pr23937.d b/ld/testsuite/ld-powerpc/pr23937.d
  3188. new file mode 100644
  3189. index 0000000000..6ef79e81cf
  3190. --- /dev/null
  3191. +++ b/ld/testsuite/ld-powerpc/pr23937.d
  3192. @@ -0,0 +1,10 @@
  3193. +#as: -a64
  3194. +#ld: -melf64ppc --defsym puts=0 --defsym _start=0
  3195. +#readelf: -srW
  3196. +# Check that the IRELATIVE addend is magic+0, not magic+8
  3197. +
  3198. +#...
  3199. +.* R_PPC64_IRELATIVE +10000180
  3200. +#...
  3201. +.*: 0+10000180 +20 IFUNC +LOCAL +DEFAULT .* magic
  3202. +#pass
  3203. diff --git a/ld/testsuite/ld-powerpc/pr23937.s b/ld/testsuite/ld-powerpc/pr23937.s
  3204. new file mode 100644
  3205. index 0000000000..155e53adb7
  3206. --- /dev/null
  3207. +++ b/ld/testsuite/ld-powerpc/pr23937.s
  3208. @@ -0,0 +1,65 @@
  3209. + .abiversion 2
  3210. + .text
  3211. + .p2align 4,,15
  3212. + .type implementation, @function
  3213. +implementation:
  3214. +.LCF0:
  3215. + addis 2,12,.TOC.-.LCF0@ha
  3216. + addi 2,2,.TOC.-.LCF0@l
  3217. + .localentry implementation,.-implementation
  3218. + mflr 0
  3219. + addis 3,2,.LC0@toc@ha
  3220. + addi 3,3,.LC0@toc@l
  3221. + std 0,16(1)
  3222. + stdu 1,-32(1)
  3223. + bl puts
  3224. + nop
  3225. + addi 1,1,32
  3226. + li 3,0
  3227. + ld 0,16(1)
  3228. + mtlr 0
  3229. + blr
  3230. + .size implementation,.-implementation
  3231. +
  3232. + .p2align 4,,15
  3233. + .type resolver, @function
  3234. +resolver:
  3235. +.LCF1:
  3236. + addis 2,12,.TOC.-.LCF1@ha
  3237. + addi 2,2,.TOC.-.LCF1@l
  3238. + .localentry resolver,.-resolver
  3239. + addis 3,2,implementation@toc@ha
  3240. + addi 3,3,implementation@toc@l
  3241. + blr
  3242. + .size resolver,.-resolver
  3243. +
  3244. + .type magic, @gnu_indirect_function
  3245. + .set magic,resolver
  3246. +
  3247. + .section .text.startup,"ax",@progbits
  3248. + .p2align 4,,15
  3249. + .globl main
  3250. + .type main, @function
  3251. +main:
  3252. +.LCF2:
  3253. + addis 2,12,.TOC.-.LCF2@ha
  3254. + addi 2,2,.TOC.-.LCF2@l
  3255. + .localentry main,.-main
  3256. + mflr 0
  3257. + std 0,16(1)
  3258. + stdu 1,-32(1)
  3259. + bl magic
  3260. + nop
  3261. + addi 1,1,32
  3262. + cntlzw 3,3
  3263. + ld 0,16(1)
  3264. + srwi 3,3,5
  3265. + mtlr 0
  3266. + xori 3,3,0x1
  3267. + blr
  3268. + .size main,.-main
  3269. +
  3270. + .section .rodata.str1.8,"aMS",@progbits,1
  3271. + .p2align 3
  3272. +.LC0:
  3273. + .string "'ere I am JH"
  3274. diff --git a/ld/testsuite/ld-powerpc/tlsopt5.d b/ld/testsuite/ld-powerpc/tlsopt5.d
  3275. index 4521a9b427..4caf1832ea 100644
  3276. --- a/ld/testsuite/ld-powerpc/tlsopt5.d
  3277. +++ b/ld/testsuite/ld-powerpc/tlsopt5.d
  3278. @@ -8,6 +8,13 @@
  3279. Disassembly of section \.text:
  3280. +.* <.*\.plt_call\.foo>:
  3281. +.*: (18 00 41 f8|f8 41 00 18) std r2,24\(r1\)
  3282. +.*: (28 80 82 e9|e9 82 80 28) ld r12,-32728\(r2\)
  3283. +.*: (a6 03 89 7d|7d 89 03 a6) mtctr r12
  3284. +.*: (20 04 80 4e|4e 80 04 20) bctr
  3285. + \.\.\.
  3286. +
  3287. .* <.*\.plt_call\.__tls_get_addr_opt@@GLIBC_2\.22>:
  3288. .*: (00 00 63 e9|e9 63 00 00) ld r11,0\(r3\)
  3289. .*: (08 00 83 e9|e9 83 00 08) ld r12,8\(r3\)
  3290. @@ -19,17 +26,21 @@ Disassembly of section \.text:
  3291. .*: (a6 02 68 7d|7d 68 02 a6) mflr r11
  3292. .*: (08 00 61 f9|f9 61 00 08) std r11,8\(r1\)
  3293. .*: (18 00 41 f8|f8 41 00 18) std r2,24\(r1\)
  3294. -.*: (28 80 82 e9|e9 82 80 28) ld r12,-32728\(r2\)
  3295. +.*: (30 80 82 e9|e9 82 80 30) ld r12,-32720\(r2\)
  3296. .*: (a6 03 89 7d|7d 89 03 a6) mtctr r12
  3297. .*: (21 04 80 4e|4e 80 04 21) bctrl
  3298. .*: (18 00 41 e8|e8 41 00 18) ld r2,24\(r1\)
  3299. .*: (08 00 61 e9|e9 61 00 08) ld r11,8\(r1\)
  3300. .*: (a6 03 68 7d|7d 68 03 a6) mtlr r11
  3301. .*: (20 00 80 4e|4e 80 00 20) blr
  3302. + \.\.\.
  3303. .* <_start>:
  3304. .*: (08 80 62 38|38 62 80 08) addi r3,r2,-32760
  3305. -.*: (b9 ff ff 4b|4b ff ff b9) bl .*
  3306. +.*: (9d ff ff 4b|4b ff ff 9d) bl .* <.*\.plt_call\.__tls_get_addr_opt@@GLIBC_2\.22>
  3307. +.*: (00 00 00 60|60 00 00 00) nop
  3308. +.*: (75 ff ff 4b|4b ff ff 75) bl .* <.*\.plt_call\.foo>
  3309. +.*: (18 00 41 e8|e8 41 00 18) ld r2,24\(r1\)
  3310. .*: (00 00 00 60|60 00 00 00) nop
  3311. .*
  3312. .*
  3313. @@ -50,5 +61,8 @@ Disassembly of section \.text:
  3314. .*: (08 00 6b e9|e9 6b 00 08) ld r11,8\(r11\)
  3315. .*: (20 04 80 4e|4e 80 04 20) bctr
  3316. +.* <foo@plt>:
  3317. +.* (c8 ff ff 4b|4b ff ff c8) b .*
  3318. +
  3319. .* <__tls_get_addr_opt@plt>:
  3320. -.*: (c8 ff ff 4b|4b ff ff c8) b .*
  3321. +.*: (c4 ff ff 4b|4b ff ff c4) b .*
  3322. diff --git a/ld/testsuite/ld-powerpc/tlsopt5.s b/ld/testsuite/ld-powerpc/tlsopt5.s
  3323. index 70902ef96a..7cb82db1f6 100644
  3324. --- a/ld/testsuite/ld-powerpc/tlsopt5.s
  3325. +++ b/ld/testsuite/ld-powerpc/tlsopt5.s
  3326. @@ -1,7 +1,10 @@
  3327. .globl _start
  3328. + .weak foo
  3329. _start:
  3330. .cfi_startproc
  3331. addi 3,2,gd@got@tlsgd
  3332. bl __tls_get_addr(gd@tlsgd)
  3333. nop
  3334. + bl foo
  3335. + nop
  3336. .cfi_endproc
  3337. diff --git a/ld/testsuite/ld-powerpc/tlsopt5.wf b/ld/testsuite/ld-powerpc/tlsopt5.wf
  3338. index af8cb76d1c..f0453610e0 100644
  3339. --- a/ld/testsuite/ld-powerpc/tlsopt5.wf
  3340. +++ b/ld/testsuite/ld-powerpc/tlsopt5.wf
  3341. @@ -7,11 +7,10 @@ Contents of the \.eh_frame section:
  3342. Data alignment factor: -8
  3343. Return address column: 65
  3344. Augmentation data: 1b
  3345. -
  3346. DW_CFA_def_cfa: r1 ofs 0
  3347. 0+14 0+14 0+18 FDE cie=0+ pc=.*
  3348. - DW_CFA_advance_loc: 48 to .*
  3349. + DW_CFA_advance_loc: 80 to .*
  3350. DW_CFA_offset_extended_sf: r65 at cfa\+8
  3351. DW_CFA_advance_loc: 16 to .*
  3352. DW_CFA_restore_extended: r65
  3353. diff --git a/ld/testsuite/ld-scripts/print-memory-usage.t b/ld/testsuite/ld-scripts/print-memory-usage.t
  3354. index 5ff057a5e3..6eda1d2dc4 100644
  3355. --- a/ld/testsuite/ld-scripts/print-memory-usage.t
  3356. +++ b/ld/testsuite/ld-scripts/print-memory-usage.t
  3357. @@ -11,4 +11,6 @@ SECTIONS
  3358. *(.data)
  3359. *(.rw)
  3360. }
  3361. +
  3362. + /DISCARD/ : { *(.note.gnu.property) }
  3363. }
  3364. diff --git a/ld/testsuite/ld-scripts/size-2.t b/ld/testsuite/ld-scripts/size-2.t
  3365. index 723863995e..c3c4eddab4 100644
  3366. --- a/ld/testsuite/ld-scripts/size-2.t
  3367. +++ b/ld/testsuite/ld-scripts/size-2.t
  3368. @@ -18,4 +18,5 @@ SECTIONS
  3369. LONG (SIZEOF (.tdata))
  3370. LONG (SIZEOF (.tbss))
  3371. } :image
  3372. + /DISCARD/ : { *(.note.gnu.property) }
  3373. }
  3374. diff --git a/ld/testsuite/ld-x86-64/abs-k1om.d b/ld/testsuite/ld-x86-64/abs-k1om.d
  3375. index 2c26639fc0..6b0fde0eed 100644
  3376. --- a/ld/testsuite/ld-x86-64/abs-k1om.d
  3377. +++ b/ld/testsuite/ld-x86-64/abs-k1om.d
  3378. @@ -2,7 +2,7 @@
  3379. #source: ../ld-i386/abs.s
  3380. #source: ../ld-i386/zero.s
  3381. #as: --64 -march=k1om
  3382. -#ld: -m elf_k1om
  3383. +#ld: -m elf_k1om -z noseparate-code
  3384. #objdump: -rs -j .text
  3385. .*: file format .*
  3386. diff --git a/ld/testsuite/ld-x86-64/abs-l1om.d b/ld/testsuite/ld-x86-64/abs-l1om.d
  3387. index 1fb96d44b7..f87869f9d0 100644
  3388. --- a/ld/testsuite/ld-x86-64/abs-l1om.d
  3389. +++ b/ld/testsuite/ld-x86-64/abs-l1om.d
  3390. @@ -2,7 +2,7 @@
  3391. #source: ../ld-i386/abs.s
  3392. #source: ../ld-i386/zero.s
  3393. #as: --64 -march=l1om
  3394. -#ld: -m elf_l1om
  3395. +#ld: -m elf_l1om -z noseparate-code
  3396. #objdump: -rs -j .text
  3397. #target: x86_64-*-linux*
  3398. diff --git a/ld/testsuite/ld-x86-64/abs.d b/ld/testsuite/ld-x86-64/abs.d
  3399. index b24b018639..d99ab4685d 100644
  3400. --- a/ld/testsuite/ld-x86-64/abs.d
  3401. +++ b/ld/testsuite/ld-x86-64/abs.d
  3402. @@ -1,7 +1,7 @@
  3403. #name: Absolute non-overflowing relocs
  3404. #source: ../ld-i386/abs.s
  3405. #source: ../ld-i386/zero.s
  3406. -#ld:
  3407. +#ld: -z noseparate-code
  3408. #objdump: -rs
  3409. .*: file format .*
  3410. diff --git a/ld/testsuite/ld-x86-64/pr12718.d b/ld/testsuite/ld-x86-64/pr12718.d
  3411. index 07d17325d0..2c503ffbaa 100644
  3412. --- a/ld/testsuite/ld-x86-64/pr12718.d
  3413. +++ b/ld/testsuite/ld-x86-64/pr12718.d
  3414. @@ -1,6 +1,6 @@
  3415. #name: PR ld/12718
  3416. #as: --64
  3417. -#ld: -melf_x86_64
  3418. +#ld: -melf_x86_64 -z noseparate-code
  3419. #readelf: -S --wide
  3420. There are 5 section headers, starting at offset 0x[0-9a-f]+:
  3421. diff --git a/ld/testsuite/ld-x86-64/pr12921.d b/ld/testsuite/ld-x86-64/pr12921.d
  3422. index 6fe6abee09..1162d55818 100644
  3423. --- a/ld/testsuite/ld-x86-64/pr12921.d
  3424. +++ b/ld/testsuite/ld-x86-64/pr12921.d
  3425. @@ -1,6 +1,6 @@
  3426. #name: PR ld/12921
  3427. #as: --64
  3428. -#ld: -melf_x86_64
  3429. +#ld: -melf_x86_64 -z noseparate-code
  3430. #readelf: -S --wide
  3431. There are 7 section headers, starting at offset 0x[0-9a-f]+:
  3432. diff --git a/ld/testsuite/ld-x86-64/pr23486a-x32.d b/ld/testsuite/ld-x86-64/pr23486a-x32.d
  3433. new file mode 100644
  3434. index 0000000000..6d9fa68cdb
  3435. --- /dev/null
  3436. +++ b/ld/testsuite/ld-x86-64/pr23486a-x32.d
  3437. @@ -0,0 +1,10 @@
  3438. +#source: pr23486a.s
  3439. +#source: pr23486b.s
  3440. +#as: --x32
  3441. +#ld: -r -m elf32_x86_64
  3442. +#readelf: -n
  3443. +
  3444. +Displaying notes found in: .note.gnu.property
  3445. + Owner Data size Description
  3446. + GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0
  3447. + Properties: x86 ISA needed: i486, 586
  3448. diff --git a/ld/testsuite/ld-x86-64/pr23486a.d b/ld/testsuite/ld-x86-64/pr23486a.d
  3449. new file mode 100644
  3450. index 0000000000..dc2b7bf760
  3451. --- /dev/null
  3452. +++ b/ld/testsuite/ld-x86-64/pr23486a.d
  3453. @@ -0,0 +1,10 @@
  3454. +#source: pr23486a.s
  3455. +#source: pr23486b.s
  3456. +#as: --64 -defsym __64_bit__=1
  3457. +#ld: -r -m elf_x86_64
  3458. +#readelf: -n
  3459. +
  3460. +Displaying notes found in: .note.gnu.property
  3461. + Owner Data size Description
  3462. + GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0
  3463. + Properties: x86 ISA needed: i486, 586
  3464. diff --git a/ld/testsuite/ld-x86-64/pr23486a.s b/ld/testsuite/ld-x86-64/pr23486a.s
  3465. new file mode 100644
  3466. index 0000000000..a07d0c7ced
  3467. --- /dev/null
  3468. +++ b/ld/testsuite/ld-x86-64/pr23486a.s
  3469. @@ -0,0 +1,30 @@
  3470. + .section ".note.gnu.property", "a"
  3471. +.ifdef __64_bit__
  3472. + .p2align 3
  3473. +.else
  3474. + .p2align 2
  3475. +.endif
  3476. + .long 1f - 0f /* name length. */
  3477. + .long 4f - 1f /* data length. */
  3478. + /* NT_GNU_PROPERTY_TYPE_0 */
  3479. + .long 5 /* note type. */
  3480. +0:
  3481. + .asciz "GNU" /* vendor name. */
  3482. +1:
  3483. +.ifdef __64_bit__
  3484. + .p2align 3
  3485. +.else
  3486. + .p2align 2
  3487. +.endif
  3488. + /* GNU_PROPERTY_X86_ISA_1_USED */
  3489. + .long 0xc0000000 /* pr_type. */
  3490. + .long 3f - 2f /* pr_datasz. */
  3491. +2:
  3492. + .long 0xa
  3493. +3:
  3494. +.ifdef __64_bit__
  3495. + .p2align 3
  3496. +.else
  3497. + .p2align 2
  3498. +.endif
  3499. +4:
  3500. diff --git a/ld/testsuite/ld-x86-64/pr23486b-x32.d b/ld/testsuite/ld-x86-64/pr23486b-x32.d
  3501. new file mode 100644
  3502. index 0000000000..0445e69d82
  3503. --- /dev/null
  3504. +++ b/ld/testsuite/ld-x86-64/pr23486b-x32.d
  3505. @@ -0,0 +1,10 @@
  3506. +#source: pr23486b.s
  3507. +#source: pr23486a.s
  3508. +#as: --x32
  3509. +#ld: -r -m elf32_x86_64
  3510. +#readelf: -n
  3511. +
  3512. +Displaying notes found in: .note.gnu.property
  3513. + Owner Data size Description
  3514. + GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0
  3515. + Properties: x86 ISA needed: i486, 586
  3516. diff --git a/ld/testsuite/ld-x86-64/pr23486b.d b/ld/testsuite/ld-x86-64/pr23486b.d
  3517. new file mode 100644
  3518. index 0000000000..dd0fe88143
  3519. --- /dev/null
  3520. +++ b/ld/testsuite/ld-x86-64/pr23486b.d
  3521. @@ -0,0 +1,10 @@
  3522. +#source: pr23486b.s
  3523. +#source: pr23486a.s
  3524. +#as: --64 -defsym __64_bit__=1
  3525. +#ld: -r -m elf_x86_64
  3526. +#readelf: -n
  3527. +
  3528. +Displaying notes found in: .note.gnu.property
  3529. + Owner Data size Description
  3530. + GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0
  3531. + Properties: x86 ISA needed: i486, 586
  3532. diff --git a/ld/testsuite/ld-x86-64/pr23486b.s b/ld/testsuite/ld-x86-64/pr23486b.s
  3533. new file mode 100644
  3534. index 0000000000..c5167eeb65
  3535. --- /dev/null
  3536. +++ b/ld/testsuite/ld-x86-64/pr23486b.s
  3537. @@ -0,0 +1,30 @@
  3538. + .section ".note.gnu.property", "a"
  3539. +.ifdef __64_bit__
  3540. + .p2align 3
  3541. +.else
  3542. + .p2align 2
  3543. +.endif
  3544. + .long 1f - 0f /* name length. */
  3545. + .long 4f - 1f /* data length. */
  3546. + /* NT_GNU_PROPERTY_TYPE_0 */
  3547. + .long 5 /* note type. */
  3548. +0:
  3549. + .asciz "GNU" /* vendor name. */
  3550. +1:
  3551. +.ifdef __64_bit__
  3552. + .p2align 3
  3553. +.else
  3554. + .p2align 2
  3555. +.endif
  3556. + /* GNU_PROPERTY_X86_ISA_1_NEEDED */
  3557. + .long 0xc0000001 /* pr_type. */
  3558. + .long 3f - 2f /* pr_datasz. */
  3559. +2:
  3560. + .long 0x3
  3561. +3:
  3562. +.ifdef __64_bit__
  3563. + .p2align 3
  3564. +.else
  3565. + .p2align 2
  3566. +.endif
  3567. +4:
  3568. diff --git a/ld/testsuite/ld-x86-64/pr23854.d b/ld/testsuite/ld-x86-64/pr23854.d
  3569. new file mode 100644
  3570. index 0000000000..95770d3cef
  3571. --- /dev/null
  3572. +++ b/ld/testsuite/ld-x86-64/pr23854.d
  3573. @@ -0,0 +1,28 @@
  3574. +#as: --64 -mrelax-relocations=yes
  3575. +#ld: -melf_x86_64
  3576. +#objdump: -dw
  3577. +
  3578. +.*: +file format .*
  3579. +
  3580. +Disassembly of section .text:
  3581. +
  3582. +[a-f0-9]+ <_start>:
  3583. + +[a-f0-9]+: 66 13 05 ([0-9a-f]{2} ){4} * adc 0x[a-f0-9]+\(%rip\),%ax # [a-f0-9]+ <.got>
  3584. + +[a-f0-9]+: 66 03 1d ([0-9a-f]{2} ){4} * add 0x[a-f0-9]+\(%rip\),%bx # [a-f0-9]+ <.got>
  3585. + +[a-f0-9]+: 66 23 0d ([0-9a-f]{2} ){4} * and 0x[a-f0-9]+\(%rip\),%cx # [a-f0-9]+ <.got>
  3586. + +[a-f0-9]+: 66 3b 15 ([0-9a-f]{2} ){4} * cmp 0x[a-f0-9]+\(%rip\),%dx # [a-f0-9]+ <.got>
  3587. + +[a-f0-9]+: 66 0b 3d ([0-9a-f]{2} ){4} * or 0x[a-f0-9]+\(%rip\),%di # [a-f0-9]+ <.got>
  3588. + +[a-f0-9]+: 66 1b 35 ([0-9a-f]{2} ){4} * sbb 0x[a-f0-9]+\(%rip\),%si # [a-f0-9]+ <.got>
  3589. + +[a-f0-9]+: 66 2b 2d ([0-9a-f]{2} ){4} * sub 0x[a-f0-9]+\(%rip\),%bp # [a-f0-9]+ <.got>
  3590. + +[a-f0-9]+: 66 44 33 05 ([0-9a-f]{2} ){4} * xor 0x[a-f0-9]+\(%rip\),%r8w # [a-f0-9]+ <.got>
  3591. + +[a-f0-9]+: 66 85 0d ([0-9a-f]{2} ){4} * test %cx,0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <.got>
  3592. + +[a-f0-9]+: 66 13 05 ([0-9a-f]{2} ){4} * adc 0x[a-f0-9]+\(%rip\),%ax # [a-f0-9]+ <.got\+0x8>
  3593. + +[a-f0-9]+: 66 03 1d ([0-9a-f]{2} ){4} * add 0x[a-f0-9]+\(%rip\),%bx # [a-f0-9]+ <.got\+0x8>
  3594. + +[a-f0-9]+: 66 23 0d ([0-9a-f]{2} ){4} * and 0x[a-f0-9]+\(%rip\),%cx # [a-f0-9]+ <.got\+0x8>
  3595. + +[a-f0-9]+: 66 3b 15 ([0-9a-f]{2} ){4} * cmp 0x[a-f0-9]+\(%rip\),%dx # [a-f0-9]+ <.got\+0x8>
  3596. + +[a-f0-9]+: 66 0b 3d ([0-9a-f]{2} ){4} * or 0x[a-f0-9]+\(%rip\),%di # [a-f0-9]+ <.got\+0x8>
  3597. + +[a-f0-9]+: 66 1b 35 ([0-9a-f]{2} ){4} * sbb 0x[a-f0-9]+\(%rip\),%si # [a-f0-9]+ <.got\+0x8>
  3598. + +[a-f0-9]+: 66 2b 2d ([0-9a-f]{2} ){4} * sub 0x[a-f0-9]+\(%rip\),%bp # [a-f0-9]+ <.got\+0x8>
  3599. + +[a-f0-9]+: 66 44 33 05 ([0-9a-f]{2} ){4} * xor 0x[a-f0-9]+\(%rip\),%r8w # [a-f0-9]+ <.got\+0x8>
  3600. + +[a-f0-9]+: 66 85 0d ([0-9a-f]{2} ){4} * test %cx,0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <.got\+0x8>
  3601. +#pass
  3602. diff --git a/ld/testsuite/ld-x86-64/pr23854.s b/ld/testsuite/ld-x86-64/pr23854.s
  3603. new file mode 100644
  3604. index 0000000000..b720154fb2
  3605. --- /dev/null
  3606. +++ b/ld/testsuite/ld-x86-64/pr23854.s
  3607. @@ -0,0 +1,33 @@
  3608. + .data
  3609. + .type bar, @object
  3610. +bar:
  3611. + .byte 1
  3612. + .size bar, .-bar
  3613. + .globl foo
  3614. + .type foo, @object
  3615. +foo:
  3616. + .byte 1
  3617. + .size foo, .-foo
  3618. + .text
  3619. + .globl _start
  3620. + .type _start, @function
  3621. +_start:
  3622. + adcw bar@GOTPCREL(%rip), %ax
  3623. + addw bar@GOTPCREL(%rip), %bx
  3624. + andw bar@GOTPCREL(%rip), %cx
  3625. + cmpw bar@GOTPCREL(%rip), %dx
  3626. + orw bar@GOTPCREL(%rip), %di
  3627. + sbbw bar@GOTPCREL(%rip), %si
  3628. + subw bar@GOTPCREL(%rip), %bp
  3629. + xorw bar@GOTPCREL(%rip), %r8w
  3630. + testw %cx, bar@GOTPCREL(%rip)
  3631. + adcw foo@GOTPCREL(%rip), %ax
  3632. + addw foo@GOTPCREL(%rip), %bx
  3633. + andw foo@GOTPCREL(%rip), %cx
  3634. + cmpw foo@GOTPCREL(%rip), %dx
  3635. + orw foo@GOTPCREL(%rip), %di
  3636. + sbbw foo@GOTPCREL(%rip), %si
  3637. + subw foo@GOTPCREL(%rip), %bp
  3638. + xorw foo@GOTPCREL(%rip), %r8w
  3639. + testw %cx, foo@GOTPCREL(%rip)
  3640. + .size _start, .-_start
  3641. diff --git a/ld/testsuite/ld-x86-64/property-3.r b/ld/testsuite/ld-x86-64/property-3.r
  3642. index 0ed91f5922..d03203c1e5 100644
  3643. --- a/ld/testsuite/ld-x86-64/property-3.r
  3644. +++ b/ld/testsuite/ld-x86-64/property-3.r
  3645. @@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property
  3646. Owner Data size Description
  3647. GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0
  3648. Properties: stack size: 0x800000
  3649. - x86 ISA used: 586, SSE
  3650. x86 ISA needed: i486, 586
  3651. #pass
  3652. diff --git a/ld/testsuite/ld-x86-64/property-4.r b/ld/testsuite/ld-x86-64/property-4.r
  3653. index cb2bc15d9a..da295eb6c7 100644
  3654. --- a/ld/testsuite/ld-x86-64/property-4.r
  3655. +++ b/ld/testsuite/ld-x86-64/property-4.r
  3656. @@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property
  3657. Owner Data size Description
  3658. GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0
  3659. Properties: stack size: 0x800000
  3660. - x86 ISA used: i486, 586, SSE
  3661. x86 ISA needed: i486, 586, SSE
  3662. #pass
  3663. diff --git a/ld/testsuite/ld-x86-64/property-5.r b/ld/testsuite/ld-x86-64/property-5.r
  3664. index 552965058c..e4141594b3 100644
  3665. --- a/ld/testsuite/ld-x86-64/property-5.r
  3666. +++ b/ld/testsuite/ld-x86-64/property-5.r
  3667. @@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property
  3668. Owner Data size Description
  3669. GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0
  3670. Properties: stack size: 0x900000
  3671. - x86 ISA used: i486, 586, SSE
  3672. x86 ISA needed: i486, 586, SSE
  3673. #pass
  3674. diff --git a/ld/testsuite/ld-x86-64/property-x86-3.s b/ld/testsuite/ld-x86-64/property-x86-3.s
  3675. index be8cc9efb1..239cf622ff 100644
  3676. --- a/ld/testsuite/ld-x86-64/property-x86-3.s
  3677. +++ b/ld/testsuite/ld-x86-64/property-x86-3.s
  3678. @@ -41,7 +41,11 @@
  3679. 3:
  3680. .section ".note.gnu.property", "a"
  3681. +.ifdef __64_bit__
  3682. .p2align 3
  3683. +.else
  3684. + .p2align 2
  3685. +.endif
  3686. .long 1f - 0f /* name length. */
  3687. .long 3f - 1f /* data length. */
  3688. /* NT_GNU_PROPERTY_TYPE_0 */
  3689. diff --git a/ld/testsuite/ld-x86-64/property-x86-ibt3a-x32.d b/ld/testsuite/ld-x86-64/property-x86-ibt3a-x32.d
  3690. index 011426f5a4..4cec728dc7 100644
  3691. --- a/ld/testsuite/ld-x86-64/property-x86-ibt3a-x32.d
  3692. +++ b/ld/testsuite/ld-x86-64/property-x86-ibt3a-x32.d
  3693. @@ -6,6 +6,5 @@
  3694. Displaying notes found in: .note.gnu.property
  3695. Owner Data size Description
  3696. - GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0
  3697. - Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1
  3698. - x86 ISA needed: i486, 586, SSE2, SSE3
  3699. + GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0
  3700. + Properties: x86 ISA needed: i486, 586, SSE2, SSE3
  3701. diff --git a/ld/testsuite/ld-x86-64/property-x86-ibt3a.d b/ld/testsuite/ld-x86-64/property-x86-ibt3a.d
  3702. index 1b4229a037..a8df49a351 100644
  3703. --- a/ld/testsuite/ld-x86-64/property-x86-ibt3a.d
  3704. +++ b/ld/testsuite/ld-x86-64/property-x86-ibt3a.d
  3705. @@ -6,6 +6,5 @@
  3706. Displaying notes found in: .note.gnu.property
  3707. Owner Data size Description
  3708. - GNU 0x00000020 NT_GNU_PROPERTY_TYPE_0
  3709. - Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1
  3710. - x86 ISA needed: i486, 586, SSE2, SSE3
  3711. + GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0
  3712. + Properties: x86 ISA needed: i486, 586, SSE2, SSE3
  3713. diff --git a/ld/testsuite/ld-x86-64/property-x86-ibt3b-x32.d b/ld/testsuite/ld-x86-64/property-x86-ibt3b-x32.d
  3714. index 290ed6abf1..c112626711 100644
  3715. --- a/ld/testsuite/ld-x86-64/property-x86-ibt3b-x32.d
  3716. +++ b/ld/testsuite/ld-x86-64/property-x86-ibt3b-x32.d
  3717. @@ -6,6 +6,5 @@
  3718. Displaying notes found in: .note.gnu.property
  3719. Owner Data size Description
  3720. - GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0
  3721. - Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1
  3722. - x86 ISA needed: i486, 586, SSE2, SSE3
  3723. + GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0
  3724. + Properties: x86 ISA needed: i486, 586, SSE2, SSE3
  3725. diff --git a/ld/testsuite/ld-x86-64/property-x86-ibt3b.d b/ld/testsuite/ld-x86-64/property-x86-ibt3b.d
  3726. index 1142e03272..f10dffdc2c 100644
  3727. --- a/ld/testsuite/ld-x86-64/property-x86-ibt3b.d
  3728. +++ b/ld/testsuite/ld-x86-64/property-x86-ibt3b.d
  3729. @@ -6,6 +6,5 @@
  3730. Displaying notes found in: .note.gnu.property
  3731. Owner Data size Description
  3732. - GNU 0x00000020 NT_GNU_PROPERTY_TYPE_0
  3733. - Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1
  3734. - x86 ISA needed: i486, 586, SSE2, SSE3
  3735. + GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0
  3736. + Properties: x86 ISA needed: i486, 586, SSE2, SSE3
  3737. diff --git a/ld/testsuite/ld-x86-64/property-x86-shstk3a-x32.d b/ld/testsuite/ld-x86-64/property-x86-shstk3a-x32.d
  3738. index 819542d181..0147a3c7b6 100644
  3739. --- a/ld/testsuite/ld-x86-64/property-x86-shstk3a-x32.d
  3740. +++ b/ld/testsuite/ld-x86-64/property-x86-shstk3a-x32.d
  3741. @@ -6,6 +6,5 @@
  3742. Displaying notes found in: .note.gnu.property
  3743. Owner Data size Description
  3744. - GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0
  3745. - Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1
  3746. - x86 ISA needed: i486, 586, SSE2, SSE3
  3747. + GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0
  3748. + Properties: x86 ISA needed: i486, 586, SSE2, SSE3
  3749. diff --git a/ld/testsuite/ld-x86-64/property-x86-shstk3a.d b/ld/testsuite/ld-x86-64/property-x86-shstk3a.d
  3750. index 4c5d0e0a18..1f8c2dc929 100644
  3751. --- a/ld/testsuite/ld-x86-64/property-x86-shstk3a.d
  3752. +++ b/ld/testsuite/ld-x86-64/property-x86-shstk3a.d
  3753. @@ -6,6 +6,5 @@
  3754. Displaying notes found in: .note.gnu.property
  3755. Owner Data size Description
  3756. - GNU 0x00000020 NT_GNU_PROPERTY_TYPE_0
  3757. - Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1
  3758. - x86 ISA needed: i486, 586, SSE2, SSE3
  3759. + GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0
  3760. + Properties: x86 ISA needed: i486, 586, SSE2, SSE3
  3761. diff --git a/ld/testsuite/ld-x86-64/property-x86-shstk3b-x32.d b/ld/testsuite/ld-x86-64/property-x86-shstk3b-x32.d
  3762. index ba181e0bc5..7ca2539ca5 100644
  3763. --- a/ld/testsuite/ld-x86-64/property-x86-shstk3b-x32.d
  3764. +++ b/ld/testsuite/ld-x86-64/property-x86-shstk3b-x32.d
  3765. @@ -6,6 +6,5 @@
  3766. Displaying notes found in: .note.gnu.property
  3767. Owner Data size Description
  3768. - GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0
  3769. - Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1
  3770. - x86 ISA needed: i486, 586, SSE2, SSE3
  3771. + GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0
  3772. + Properties: x86 ISA needed: i486, 586, SSE2, SSE3
  3773. diff --git a/ld/testsuite/ld-x86-64/property-x86-shstk3b.d b/ld/testsuite/ld-x86-64/property-x86-shstk3b.d
  3774. index 5216f385dd..f66a40e449 100644
  3775. --- a/ld/testsuite/ld-x86-64/property-x86-shstk3b.d
  3776. +++ b/ld/testsuite/ld-x86-64/property-x86-shstk3b.d
  3777. @@ -6,6 +6,5 @@
  3778. Displaying notes found in: .note.gnu.property
  3779. Owner Data size Description
  3780. - GNU 0x00000020 NT_GNU_PROPERTY_TYPE_0
  3781. - Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1
  3782. - x86 ISA needed: i486, 586, SSE2, SSE3
  3783. + GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0
  3784. + Properties: x86 ISA needed: i486, 586, SSE2, SSE3
  3785. diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
  3786. index 6edb9e86f4..9abafd2765 100644
  3787. --- a/ld/testsuite/ld-x86-64/x86-64.exp
  3788. +++ b/ld/testsuite/ld-x86-64/x86-64.exp
  3789. @@ -403,6 +403,11 @@ run_dump_test "pr23372a"
  3790. run_dump_test "pr23372a-x32"
  3791. run_dump_test "pr23372b"
  3792. run_dump_test "pr23372b-x32"
  3793. +run_dump_test "pr23486a"
  3794. +run_dump_test "pr23486a-x32"
  3795. +run_dump_test "pr23486b"
  3796. +run_dump_test "pr23486b-x32"
  3797. +run_dump_test "pr23854"
  3798. if { ![istarget "x86_64-*-linux*"] && ![istarget "x86_64-*-nacl*"]} {
  3799. return
  3800. diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
  3801. index cfbefe9028..1095091882 100644
  3802. --- a/ld/testsuite/lib/ld-lib.exp
  3803. +++ b/ld/testsuite/lib/ld-lib.exp
  3804. @@ -1482,7 +1482,10 @@ proc run_ld_link_exec_tests { ldtests args } {
  3805. continue
  3806. }
  3807. - if { [ string match "c++" $lang ] } {
  3808. + if { [ string match "asm" $lang ] } {
  3809. + set link_proc ld_link
  3810. + set link_cmd $ld
  3811. + } elseif { [ string match "c++" $lang ] } {
  3812. set link_proc ld_link
  3813. set link_cmd $CXX
  3814. } else {
  3815. diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
  3816. index d04963a9fa..8f89565935 100644
  3817. --- a/opcodes/ChangeLog
  3818. +++ b/opcodes/ChangeLog
  3819. @@ -1,3 +1,36 @@
  3820. +2018-10-19 Tamar Christina <tamar.christina@arm.com>
  3821. +
  3822. + * arm-dis.c (UNKNOWN_INSTRUCTION_32BIT): Format specifier for arm mode.
  3823. + (UNKNOWN_INSTRUCTION_16BIT): Format specifier for thumb mode.
  3824. + (print_insn_arm, print_insn_thumb16, print_insn_thumb32): Use them.
  3825. +
  3826. +2018-10-16 Matthew Malcomson <matthew.malcomson@arm.com>
  3827. +
  3828. + * aarch64-opc.c (struct operand_qualifier_data): Change qualifier data
  3829. + corresponding to AARCH64_OPND_QLF_S_4B qualifier.
  3830. +
  3831. +2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
  3832. +
  3833. + * i386-dis.c (rm_table): Add enclv.
  3834. + * i386-opc.tbl: Add enclv.
  3835. + * i386-tbl.h: Regenerated.
  3836. +
  3837. +2018-07-18 H.J. Lu <hongjiu.lu@intel.com>
  3838. +
  3839. + PR gas/23418
  3840. + * i386-opc.h (Byte): Update comments.
  3841. + (Word): Likewise.
  3842. + (Dword): Likewise.
  3843. + (Fword): Likewise.
  3844. + (Qword): Likewise.
  3845. + (Tbyte): Likewise.
  3846. + (Xmmword): Likewise.
  3847. + (Ymmword): Likewise.
  3848. + (Zmmword): Likewise.
  3849. + * i386-opc.tbl: Split vcvtps2qq, vcvtps2uqq, vcvttps2qq and
  3850. + vcvttps2uqq.
  3851. + * i386-tbl.h: Regenerated.
  3852. +
  3853. 2018-07-18 Nick Clifton <nickc@redhat.com>
  3854. 2.31.1 Release point.
  3855. diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c
  3856. index ba2af7bfc2..e59240c98d 100644
  3857. --- a/opcodes/aarch64-opc.c
  3858. +++ b/opcodes/aarch64-opc.c
  3859. @@ -698,7 +698,7 @@ struct operand_qualifier_data aarch64_opnd_qualifiers[] =
  3860. {4, 1, 0x2, "s", OQK_OPD_VARIANT},
  3861. {8, 1, 0x3, "d", OQK_OPD_VARIANT},
  3862. {16, 1, 0x4, "q", OQK_OPD_VARIANT},
  3863. - {1, 4, 0x0, "4b", OQK_OPD_VARIANT},
  3864. + {4, 1, 0x0, "4b", OQK_OPD_VARIANT},
  3865. {1, 4, 0x0, "4b", OQK_OPD_VARIANT},
  3866. {1, 8, 0x0, "8b", OQK_OPD_VARIANT},
  3867. @@ -2501,6 +2501,7 @@ operand_general_constraint_met_p (const aarch64_opnd_info *opnds, int idx,
  3868. else
  3869. num = 16;
  3870. num = num / aarch64_get_qualifier_esize (qualifier) - 1;
  3871. + assert (aarch64_get_qualifier_nelem (qualifier) == 1);
  3872. /* Index out-of-range. */
  3873. if (!value_in_range_p (opnd->reglane.index, 0, num))
  3874. diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c
  3875. index b6cccc5233..bc97bc2617 100644
  3876. --- a/opcodes/arm-dis.c
  3877. +++ b/opcodes/arm-dis.c
  3878. @@ -141,6 +141,8 @@ enum opcode_sentinel_enum
  3879. } opcode_sentinels;
  3880. #define UNDEFINED_INSTRUCTION "\t\t; <UNDEFINED> instruction: %0-31x"
  3881. +#define UNKNOWN_INSTRUCTION_32BIT "\t\t; <UNDEFINED> instruction: %08x"
  3882. +#define UNKNOWN_INSTRUCTION_16BIT "\t\t; <UNDEFINED> instruction: %04x"
  3883. #define UNPREDICTABLE_INSTRUCTION "\t; <UNPREDICTABLE>"
  3884. /* Common coprocessor opcodes shared between Arm and Thumb-2. */
  3885. @@ -5188,7 +5190,8 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info, long given)
  3886. return;
  3887. }
  3888. }
  3889. - abort ();
  3890. + func (stream, UNKNOWN_INSTRUCTION_32BIT, (unsigned)given);
  3891. + return;
  3892. }
  3893. /* Print one 16-bit Thumb instruction from PC on INFO->STREAM. */
  3894. @@ -5459,7 +5462,8 @@ print_insn_thumb16 (bfd_vma pc, struct disassemble_info *info, long given)
  3895. }
  3896. /* No match. */
  3897. - abort ();
  3898. + func (stream, UNKNOWN_INSTRUCTION_16BIT, (unsigned)given);
  3899. + return;
  3900. }
  3901. /* Return the name of an V7M special register. */
  3902. @@ -6083,7 +6087,8 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
  3903. }
  3904. /* No match. */
  3905. - abort ();
  3906. + func (stream, UNKNOWN_INSTRUCTION_32BIT, (unsigned)given);
  3907. + return;
  3908. }
  3909. /* Print data bytes on INFO->STREAM. */
  3910. diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
  3911. index 42d219cb11..78436879fb 100644
  3912. --- a/opcodes/i386-dis.c
  3913. +++ b/opcodes/i386-dis.c
  3914. @@ -12321,7 +12321,7 @@ static const struct dis386 rm_table[][8] = {
  3915. },
  3916. {
  3917. /* RM_0F01_REG_0 */
  3918. - { Bad_Opcode },
  3919. + { "enclv", { Skip_MODRM }, 0 },
  3920. { "vmcall", { Skip_MODRM }, 0 },
  3921. { "vmlaunch", { Skip_MODRM }, 0 },
  3922. { "vmresume", { Skip_MODRM }, 0 },
  3923. diff --git a/opcodes/i386-opc.h b/opcodes/i386-opc.h
  3924. index 9a22b3c95f..f43b5e11eb 100644
  3925. --- a/opcodes/i386-opc.h
  3926. +++ b/opcodes/i386-opc.h
  3927. @@ -736,23 +736,23 @@ enum
  3928. RegMem,
  3929. /* Memory. */
  3930. Mem,
  3931. - /* BYTE memory. */
  3932. + /* BYTE size. */
  3933. Byte,
  3934. - /* WORD memory. 2 byte */
  3935. + /* WORD size. 2 byte */
  3936. Word,
  3937. - /* DWORD memory. 4 byte */
  3938. + /* DWORD size. 4 byte */
  3939. Dword,
  3940. - /* FWORD memory. 6 byte */
  3941. + /* FWORD size. 6 byte */
  3942. Fword,
  3943. - /* QWORD memory. 8 byte */
  3944. + /* QWORD size. 8 byte */
  3945. Qword,
  3946. - /* TBYTE memory. 10 byte */
  3947. + /* TBYTE size. 10 byte */
  3948. Tbyte,
  3949. - /* XMMWORD memory. */
  3950. + /* XMMWORD size. */
  3951. Xmmword,
  3952. - /* YMMWORD memory. */
  3953. + /* YMMWORD size. */
  3954. Ymmword,
  3955. - /* ZMMWORD memory. */
  3956. + /* ZMMWORD size. */
  3957. Zmmword,
  3958. /* Unspecified memory size. */
  3959. Unspecified,
  3960. diff --git a/opcodes/i386-opc.tbl b/opcodes/i386-opc.tbl
  3961. index fad588ae3f..99f4d6635a 100644
  3962. --- a/opcodes/i386-opc.tbl
  3963. +++ b/opcodes/i386-opc.tbl
  3964. @@ -4100,6 +4100,7 @@ xsavec64, 1, 0xfc7, 0x4, 2, CpuXSAVEC|Cpu64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No
  3965. encls, 0, 0xf01cf, None, 3, CpuSE1, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { 0 }
  3966. enclu, 0, 0xf01d7, None, 3, CpuSE1, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { 0 }
  3967. +enclv, 0, 0xf01c0, None, 3, CpuSE1, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { 0 }
  3968. // SGX instructions end.
  3969. @@ -5408,11 +5409,13 @@ vcvtpd2uqq, 2, 0x6679, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=3|Masking=3|
  3970. vcvtpd2uqq, 3, 0x6679, None, 1, CpuAVX512DQ, Modrm|EVex=1|Masking=3|VexOpcode=0|VexW=2|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf|StaticRounding|SAE, { Imm8, RegZMM, RegZMM }
  3971. vcvtps2qq, 2, 0x667B, None, 1, CpuAVX512DQ, Modrm|EVex=1|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=5|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegYMM|Dword|YMMword|Unspecified|BaseIndex, RegZMM }
  3972. -vcvtps2qq, 2, 0x667B, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=3|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM|Dword|Qword|Unspecified|BaseIndex, RegXMM }
  3973. +vcvtps2qq, 2, 0x667B, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=0|VexW=1|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM, RegXMM }
  3974. +vcvtps2qq, 2, 0x667B, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=3|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { Dword|Qword|Unspecified|BaseIndex, RegXMM }
  3975. vcvtps2qq, 2, 0x667B, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=3|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=4|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM|Dword|XMMword|Unspecified|BaseIndex, RegYMM }
  3976. vcvtps2qq, 3, 0x667B, None, 1, CpuAVX512DQ, Modrm|EVex=1|Masking=3|VexOpcode=0|VexW=1|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf|StaticRounding|SAE, { Imm8, RegYMM, RegZMM }
  3977. vcvtps2uqq, 2, 0x6679, None, 1, CpuAVX512DQ, Modrm|EVex=1|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=5|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegYMM|Dword|YMMword|Unspecified|BaseIndex, RegZMM }
  3978. -vcvtps2uqq, 2, 0x6679, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=3|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM|Dword|Qword|Unspecified|BaseIndex, RegXMM }
  3979. +vcvtps2uqq, 2, 0x6679, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=0|VexW=1|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM, RegXMM }
  3980. +vcvtps2uqq, 2, 0x6679, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=3|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { Dword|Qword|Unspecified|BaseIndex, RegXMM }
  3981. vcvtps2uqq, 2, 0x6679, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=3|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=4|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM|Dword|XMMword|Unspecified|BaseIndex, RegYMM }
  3982. vcvtps2uqq, 3, 0x6679, None, 1, CpuAVX512DQ, Modrm|EVex=1|Masking=3|VexOpcode=0|VexW=1|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf|StaticRounding|SAE, { Imm8, RegYMM, RegZMM }
  3983. @@ -5442,11 +5445,13 @@ vcvttpd2uqq, 2, 0x6678, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=3|Masking=3
  3984. vcvttpd2uqq, 3, 0x6678, None, 1, CpuAVX512DQ, Modrm|EVex=1|Masking=3|VexOpcode=0|VexW=2|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf|SAE, { Imm8, RegZMM, RegZMM }
  3985. vcvttps2qq, 2, 0x667A, None, 1, CpuAVX512DQ, Modrm|EVex=1|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=5|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegYMM|Dword|YMMword|Unspecified|BaseIndex, RegZMM }
  3986. -vcvttps2qq, 2, 0x667A, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=3|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM|Dword|Qword|Unspecified|BaseIndex, RegXMM }
  3987. +vcvttps2qq, 2, 0x667A, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=0|VexW=1|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM, RegXMM }
  3988. +vcvttps2qq, 2, 0x667A, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=3|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { Dword|Qword|Unspecified|BaseIndex, RegXMM }
  3989. vcvttps2qq, 2, 0x667A, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=3|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=4|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM|Dword|XMMword|Unspecified|BaseIndex, RegYMM }
  3990. vcvttps2qq, 3, 0x667A, None, 1, CpuAVX512DQ, Modrm|EVex=1|Masking=3|VexOpcode=0|VexW=1|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf|SAE, { Imm8, RegYMM, RegZMM }
  3991. vcvttps2uqq, 2, 0x6678, None, 1, CpuAVX512DQ, Modrm|EVex=1|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=5|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegYMM|Dword|YMMword|Unspecified|BaseIndex, RegZMM }
  3992. -vcvttps2uqq, 2, 0x6678, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=3|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM|Dword|Qword|Unspecified|BaseIndex, RegXMM }
  3993. +vcvttps2uqq, 2, 0x6678, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=0|VexW=1|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM, RegXMM }
  3994. +vcvttps2uqq, 2, 0x6678, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=3|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { Dword|Qword|Unspecified|BaseIndex, RegXMM }
  3995. vcvttps2uqq, 2, 0x6678, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=3|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=4|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM|Dword|XMMword|Unspecified|BaseIndex, RegYMM }
  3996. vcvttps2uqq, 3, 0x6678, None, 1, CpuAVX512DQ, Modrm|EVex=1|Masking=3|VexOpcode=0|VexW=1|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf|SAE, { Imm8, RegYMM, RegZMM }
  3997. diff --git a/opcodes/i386-tbl.h b/opcodes/i386-tbl.h
  3998. index d513275deb..42ac313eca 100644
  3999. --- a/opcodes/i386-tbl.h
  4000. +++ b/opcodes/i386-tbl.h
  4001. @@ -83658,6 +83658,20 @@ const insn_template i386_optab[] =
  4002. { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4003. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4004. 0, 0, 0 } } } },
  4005. + { "enclv", 0, 0xf01c0, None, 3,
  4006. + { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4007. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4008. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4009. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
  4010. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4011. + 0, 0, 0, 0, 0 } },
  4012. + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,
  4013. + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4014. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4015. + 0, 0 },
  4016. + { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4017. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4018. + 0, 0, 0 } } } },
  4019. { "vcvtpd2udqx", 2, 0x79, None, 1,
  4020. { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4021. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0,
  4022. @@ -87881,6 +87895,23 @@ const insn_template i386_optab[] =
  4023. { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4024. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
  4025. 0, 0, 0 } } } },
  4026. + { "vcvtps2qq", 2, 0x667B, None, 1,
  4027. + { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4028. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0,
  4029. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4030. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4031. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4032. + 0, 0, 0, 0, 0 } },
  4033. + { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1,
  4034. + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4035. + 0, 0, 1, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4036. + 0, 0 },
  4037. + { { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4038. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
  4039. + 0, 0, 0 } },
  4040. + { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4041. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
  4042. + 0, 0, 0 } } } },
  4043. { "vcvtps2qq", 2, 0x667B, None, 1,
  4044. { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4045. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0,
  4046. @@ -87892,8 +87923,8 @@ const insn_template i386_optab[] =
  4047. 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4048. 0, 0, 1, 0, 0, 0, 0, 0, 2, 3, 1, 0, 0, 3, 0, 0, 0, 0, 0, 0,
  4049. 0, 0 },
  4050. - { { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
  4051. - 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0,
  4052. + { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
  4053. + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0,
  4054. 0, 0, 0 } },
  4055. { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4056. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
  4057. @@ -87952,6 +87983,23 @@ const insn_template i386_optab[] =
  4058. { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4059. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
  4060. 0, 0, 0 } } } },
  4061. + { "vcvtps2uqq", 2, 0x6679, None, 1,
  4062. + { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4063. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0,
  4064. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4065. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4066. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4067. + 0, 0, 0, 0, 0 } },
  4068. + { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1,
  4069. + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4070. + 0, 0, 1, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4071. + 0, 0 },
  4072. + { { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4073. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
  4074. + 0, 0, 0 } },
  4075. + { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4076. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
  4077. + 0, 0, 0 } } } },
  4078. { "vcvtps2uqq", 2, 0x6679, None, 1,
  4079. { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4080. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0,
  4081. @@ -87963,8 +88011,8 @@ const insn_template i386_optab[] =
  4082. 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4083. 0, 0, 1, 0, 0, 0, 0, 0, 2, 3, 1, 0, 0, 3, 0, 0, 0, 0, 0, 0,
  4084. 0, 0 },
  4085. - { { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
  4086. - 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0,
  4087. + { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
  4088. + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0,
  4089. 0, 0, 0 } },
  4090. { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4091. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
  4092. @@ -88412,6 +88460,23 @@ const insn_template i386_optab[] =
  4093. { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4094. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
  4095. 0, 0, 0 } } } },
  4096. + { "vcvttps2qq", 2, 0x667A, None, 1,
  4097. + { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4098. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0,
  4099. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4100. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4101. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4102. + 0, 0, 0, 0, 0 } },
  4103. + { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1,
  4104. + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4105. + 0, 0, 1, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4106. + 0, 0 },
  4107. + { { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4108. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
  4109. + 0, 0, 0 } },
  4110. + { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4111. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
  4112. + 0, 0, 0 } } } },
  4113. { "vcvttps2qq", 2, 0x667A, None, 1,
  4114. { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4115. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0,
  4116. @@ -88423,8 +88488,8 @@ const insn_template i386_optab[] =
  4117. 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4118. 0, 0, 1, 0, 0, 0, 0, 0, 2, 3, 1, 0, 0, 3, 0, 0, 0, 0, 0, 0,
  4119. 0, 0 },
  4120. - { { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
  4121. - 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0,
  4122. + { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
  4123. + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0,
  4124. 0, 0, 0 } },
  4125. { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4126. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
  4127. @@ -88483,6 +88548,23 @@ const insn_template i386_optab[] =
  4128. { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4129. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
  4130. 0, 0, 0 } } } },
  4131. + { "vcvttps2uqq", 2, 0x6678, None, 1,
  4132. + { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4133. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0,
  4134. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4135. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4136. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4137. + 0, 0, 0, 0, 0 } },
  4138. + { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1,
  4139. + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4140. + 0, 0, 1, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4141. + 0, 0 },
  4142. + { { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4143. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
  4144. + 0, 0, 0 } },
  4145. + { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4146. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
  4147. + 0, 0, 0 } } } },
  4148. { "vcvttps2uqq", 2, 0x6678, None, 1,
  4149. { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4150. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0,
  4151. @@ -88494,8 +88576,8 @@ const insn_template i386_optab[] =
  4152. 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4153. 0, 0, 1, 0, 0, 0, 0, 0, 2, 3, 1, 0, 0, 3, 0, 0, 0, 0, 0, 0,
  4154. 0, 0 },
  4155. - { { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
  4156. - 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0,
  4157. + { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
  4158. + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0,
  4159. 0, 0, 0 } },
  4160. { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4161. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
  4162. diff --git a/opcodes/s390-opc.txt b/opcodes/s390-opc.txt
  4163. index ef75e38e7e..d8a9cce1e2 100644
  4164. --- a/opcodes/s390-opc.txt
  4165. +++ b/opcodes/s390-opc.txt
  4166. @@ -1126,7 +1126,7 @@ e561 tbeginc SIL_RDU "constrained transaction begin" zEC12 zarch htm
  4167. b2f8 tend S_00 "transaction end" zEC12 zarch htm
  4168. c7 bpp SMI_U0RDP "branch prediction preload" zEC12 zarch
  4169. c5 bprp MII_UPP "branch prediction relative preload" zEC12 zarch
  4170. -b2e8 ppa RRF_U0RR "perform processor assist" zEC12 zarch
  4171. +b2e8 ppa RRF_U0RR "perform processor assist" zEC12 zarch htm
  4172. b2fa niai IE_UU "next instruction access intent" zEC12 zarch
  4173. b98f crdte RRF_RURR2 "compare and replace DAT table entry" zEC12 zarch optparm
  4174. e3000000009f lat RXY_RRRD "load and trap 32 bit" zEC12 zarch