ChangeLog-2020 185 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017
  1. 2020-12-23 H.J. Lu <hongjiu.lu@intel.com>
  2. * elf-linker-x86.h (elf_x86_cet_report): Renamed to ...
  3. (elf_x86_prop_report): This.
  4. (elf_linker_x86_params): Add lam_u48, lam_u57, lam_u48_report
  5. and lam_u57_report.
  6. * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Support
  7. GNU_PROPERTY_X86_FEATURE_1_LAM_U48 and
  8. GNU_PROPERTY_X86_FEATURE_1_LAM_U57.
  9. (_bfd_x86_elf_link_fixup_gnu_properties): Keep LAM features only
  10. for 64-bit output.
  11. 2020-12-18 H.J. Lu <hongjiu.lu@intel.com>
  12. PR ld/27091
  13. * elflink.c (elf_link_input_bfd): Copy elf_gnu_osabi_retain
  14. from input only for relocatable link.
  15. 2020-12-18 Alan Modra <amodra@gmail.com>
  16. * elf32-microblaze.c (dbg): Delete unused variable.
  17. * elf32-nds32.c (relax_group_section_id_list): Make static.
  18. * som.c (reloc_queue): Make static.
  19. * xtensa-isa.c (xtisa_errno, xtisa_error_msg): Make static.
  20. 2020-12-18 Alan Modra <amodra@gmail.com>
  21. * archive.c (_bfd_ar_spacepad, _bfd_ar_sizepad): Use auto buf.
  22. * coff-mcore.c (coff_mcore_relocate_section): Likewise.
  23. * elf32-ppc.c (ppc_elf_unhandled_reloc): Use asprintf in place
  24. of fixed size and possibly too small buf for translated message.
  25. * elf64-ppc.c (ppc64_elf_unhandled_reloc): Likewise.
  26. * elf32-v850.c (v850_elf_check_relocs): Likewise.
  27. * ecoff.c (ecoff_type_to_string): Pass in return string buff rather
  28. than using static buffer2. Delete dead code. Remove unnecessary
  29. parentheses.
  30. (_bfd_ecoff_print_symbol): Pass auto buff to ecoff_type_to_string.
  31. * elf32-rx.c (describe_flags): Pass in return string buf rather
  32. than using static buf.
  33. (rx_elf_merge_private_bfd_data): Pass buf to describe_flags.
  34. (rx_elf_print_private_bfd_data): Likewise.
  35. * mach-o.c (cpusubtype): Pass in return string buffer rather than
  36. using static buffer.
  37. (bfd_mach_o_bfd_print_private_bfd_data): Pass buff to cpusubtype.
  38. * opncls.c (separate_debug_file_exists): Make buffer an auto var.
  39. (bfd_fill_in_gnu_debuglink_section): Likewise.
  40. * peXXigen.c (rsrc_resource_name): Pass in return string buffer
  41. rather than using static buffer.
  42. (rsrc_sort_entries): Pass buff to rsrc_resource_name.
  43. * vms-alpha.c (_bfd_vms_write_emh): Pass tbuf to get_vms_time_string.
  44. * vms-misc.c (get_vms_time_string): Pass in return string tbuf
  45. rather than using static tbuf.
  46. * vms.h (get_vms_time_string): Update prototype.
  47. 2020-12-18 Alan Modra <amodra@gmail.com>
  48. * coff-z80.c (bfd_howto_type): Make typedef const.
  49. * elf32-z80.c (bfd_howto_type): Likewise.
  50. * elf32-m32c.c (EncodingTable): Likewise.
  51. * elf32-csky.c (csky_arch_for_merge): Likewise.
  52. (csky_archs): Use typedef.
  53. * elf32-m68hc11.c (m68hc11_direct_relax_table): Make const.
  54. (find_relaxable_insn, m68hc11_elf_relax_section): Adjust to suit.
  55. * elf32-ppc.c (ppc_alt_plt): Make const.
  56. * elf32-rl78.c (relax_addr16): Likewise.
  57. * targets.c (_bfd_associated_vector): Likewise.
  58. (bfd_target_vector, bfd_associated_vector): Likewise.
  59. * libbfd-in.h (bfd_target_vector, bfd_associated_vector): Likewise.
  60. * libbfd.h: Regenerate.
  61. 2020-12-18 Alan Modra <amodra@gmail.com>
  62. * ecoff.c (bfd_debug_section): Init using BFD_FAKE_SECTION.
  63. (ecoff_scom_section, ecoff_scom_symbol): Statically init using
  64. BFD_FAKE_SECTION and GLOBAL_SYM_INIT. Delete initialisation code.
  65. * elf32-m32r.c (m32r_elf_scom_section, m32r_elf_scom_symbol),
  66. * elf32-score.c (score_elf_scom_section, score_elf_scom_symbol),
  67. * elf32-score7.c (score_elf_scom_section, score_elf_scom_symbol),
  68. * elf32-tic6x.c (tic6x_elf_scom_section, tic6x_elf_scom_symbol),
  69. * elf32-v850.c (v850_elf_scom_section, v850_elf_scom_symbol),
  70. (v850_elf_tcom_section, v850_elf_tcom_symbol),
  71. (v850_elf_zcom_section, v850_elf_zcom_symbol),
  72. * elf64-mmix.c (mmix_elf_reg_section, mmix_elf_reg_section_symbol),
  73. * elfxx-mips.c (mips_elf_scom_section, mips_elf_scom_symbol): Likewise.
  74. 2020-12-16 Alan Modra <amodra@gmail.com>
  75. * elfxx-target.h (elfNN_bed): Constify.
  76. * bfd.c (bfd_elf_set_pagesize): Delete.
  77. (bfd_emul_set_maxpagesize, bfd_emul_set_commonpagesize): Delete.
  78. * elf.c (get_program_header_size): Get commonpagesize from
  79. link info.
  80. (_bfd_elf_map_sections_to_segments): Get maxpagesize from link info.
  81. (assign_file_positions_for_load_sections): Likewise.
  82. (assign_file_positions_for_non_load_sections): Likewise.
  83. (rewrite_elf_program_header): Add maxpagesize param. Set map_p_align.
  84. (copy_private_bfd_data): Don't call bfd_elf_set_maxpagesize.
  85. Instead pass maxpagesize to rewrite_elf_program_header.
  86. * elf32-nds32.c (relax_range_measurement): Add link_info param.
  87. Get maxpagesize from link_info. Adjust caller.
  88. * bfd-in2.h: Regenerate.
  89. 2020-12-16 Alan Modra <amodra@gmail.com>
  90. * elflink.c (elf_flags_to_names): Constify.
  91. 2020-12-16 Alan Modra <amodra@gmail.com>
  92. * libxcoff.h (struct xcoff_backend_data_rec): Constify
  93. _xcoff_glink_code.
  94. (XCOFF_RELOC_FUNCTION_ARGS, XCOFF_COMPLAIN_FUNCTION_ARGS): Delete.
  95. (xcoff_reloc_function, xcoff_complain_function): New typedef.
  96. (xcoff_calculate_relocation, xcoff_complain_overflow),
  97. (xcoff_reloc_type_noop, xcoff_reloc_type_fail),
  98. (xcoff_reloc_type_pos, xcoff_reloc_type_neg),
  99. (xcoff_reloc_type_rel, xcoff_reloc_type_toc),
  100. (xcoff_reloc_type_ba, xcoff_reloc_type_crel): Update declaration.
  101. * coff-rs6000.c (xcoff_reloc_type_br): Declare using typedef.
  102. (xcoff_complain_overflow_dont_func): Likewise.
  103. (xcoff_complain_overflow_bitfield_func): Likewise.
  104. (xcoff_complain_overflow_signed_func): Likewise.
  105. (xcoff_complain_overflow_unsigned_func): Likewise.
  106. (xcoff_calculate_relocation, xcoff_complain_overflow): Constify.
  107. (xcoff_glink_code): Constify.
  108. * coff64-rs6000.c (xcoff64_reloc_type_br): Declare using typedef.
  109. (xcoff64_calculate_relocation, xcoff64_glink_code): Constify.
  110. 2020-12-16 Alan Modra <amodra@gmail.com>
  111. * elf32-xtensa.c (narrowable, widenable): Constify.
  112. * xtensa-modules.c: Constify many arrays.
  113. 2020-12-16 Alan Modra <amodra@gmail.com>
  114. * elf64-ppc.c (synthetic_opd): Constify.
  115. 2020-12-16 Alan Modra <amodra@gmail.com>
  116. * arc-plt.h (plt_versions): Constify.
  117. * elf32-arc.c (arc_get_plt_version): Constify return pointer,
  118. adjust uses throughout.
  119. 2020-12-16 Alan Modra <amodra@gmail.com>
  120. * coffcode.h (pelength, peheader): Delete static variables.
  121. (coff_apply_checksum): Instead, define them as auto vars, and pass..
  122. (coff_read_word, coff_compute_checksum): ..to here. Delete
  123. unnecessary forward declarations.
  124. * pei-x86_64.c (pdata_count): Delete static variable.
  125. (struct pex64_paps): New.
  126. (pex64_print_all_pdata_sections, pex64_bfd_print_pdata): Pass
  127. a pex64_paps for counting.
  128. * peicode.h (jtab): Constify.
  129. 2020-12-15 Vivek Das Mohapatra <vivek@collabora.com>
  130. * elflink.c (bfd_elf_size_dynamic_sections): Call
  131. _bfd_elf_add_dynamic_entry to add a DT_GNU_FLAGS_1 section.
  132. 2020-12-14 Alan Modra <amodra@gmail.com>
  133. * elf-bfd.h (struct elf_obj_tdata): Add being_created.
  134. * elf.c (bfd_section_from_shdr): Delete static vars for loop
  135. detection. Use new tdata variable instead.
  136. * elfcode.h (elf_object_p): Allocate being_created.
  137. 2020-12-10 Nelson Chu <nelson.chu@sifive.com>
  138. * elfxx-riscv.c (riscv_ext_dont_care_version): New function. Return
  139. TRUE if we don't care the versions of the extensions. These extensions
  140. are added to the subset list for special purposes, with the explicit
  141. versions or the RISCV_UNKNOWN_VERSION versions.
  142. (riscv_parse_add_subset): If we do care the versions of the extension,
  143. and the versions are unknown, then report errors for the non-implicit
  144. extensions, and return directly for the implicit one.
  145. (riscv_arch_str1): Do not output i extension after e, and the extensions
  146. which versions are unknown.
  147. 2020-12-07 Siddhesh Poyarekar <siddhesh@sourceware.org>
  148. PR 26945
  149. * opncls.c (bfd_fdopenw): New function.
  150. * bfd-in2.h: Regenerate.
  151. 2020-12-07 Alan Modra <amodra@gmail.com>
  152. * elf32-csky.c (csky_relocate_contents): Correct negate test.
  153. * cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Likewise.
  154. * elf32-nds32.c (nds32_relocate_contents): Likewise.
  155. 2020-12-05 Maciej W. Rozycki <macro@linux-mips.org>
  156. * elf32-vax.c (elf_vax_check_relocs) <R_VAX_GOT32>: Use
  157. SYMBOL_REFERENCES_LOCAL rather than `h->forced_local' to check
  158. whether the symbol referred is local or not.
  159. 2020-12-04 H.J. Lu <hongjiu.lu@intel.com>
  160. PR ld/27016
  161. * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Convert load
  162. to mov only for GOTPCRELX relocations.
  163. 2020-12-04 Alan Modra <amodra@gmail.com>
  164. PR 26978
  165. * elflink.c (_bfd_elf_add_default_symbol): Handle the case where
  166. a new weak sym@@ver should be overridden by an existing sym@ver.
  167. (elf_link_add_object_symbols): Don't _bfd_elf_add_default_symbol
  168. for a new weak sym@ver when sym@@ver already exists.
  169. * linker.c (link_action): Choose MIND for previous indirect,
  170. current def, rather than MDEF.
  171. (_bfd_generic_link_add_one_symbol <MIND>): Handle redefinition of
  172. weak indirect symbol.
  173. 2020-12-01 Nelson Chu <nelson.chu@sifive.com>
  174. * elfxx-riscv.c (riscv_parse_prefixed_ext): Use riscv_compare_subsets
  175. to check the Z* extensions' order.
  176. 2020-12-01 Nelson Chu <nelson.chu@sifive.com>
  177. * elfxx-riscv.c (riscv_parse_add_subset): Allow to add g with
  178. RISCV_UNKNOWN_VERSION versions.
  179. (riscv_parse_std_ext): Add g to the subset list, we only use it
  180. to add the implicit extensions, but won't output it to arch string.
  181. (riscv_parse_add_implicit_subsets): Add implicit zicsr and zifencei
  182. for g extension.
  183. (riscv_arch_str1): Do not output g to the arch string.
  184. * elfxx-riscv.h (RISCV_UNKNOWN_VERSION): Moved to include/opcode/riscv.h.
  185. 2020-12-01 Nelson Chu <nelson.chu@sifive.com>
  186. * elfnn-riscv.c (riscv_merge_std_ext): Updated since
  187. riscv_lookup_subset is changed.
  188. * elfxx-riscv.c (riscv_ext_order): New Array used to compare the
  189. extensions' order quickly.
  190. (riscv_init_ext_order): New function. Init the riscv_ext_order
  191. according to the riscv_supported_std_ext and parse_config[i].class
  192. automatically.
  193. (riscv_compare_subsets): New function. Similar to the strcmp, but
  194. compare the subsets with the specific order.
  195. (riscv_lookup_subset): Return TRUE and set `current` to the subset
  196. if it is found. Otherwise, return FALSE and set `current` to the
  197. place where we should insert the subset.
  198. (riscv_add_implicit_subset): New function. Search the list first,
  199. and then find the right place to add the implicit_subset.
  200. (riscv_parse_add_subset): Since We have to add all arch string
  201. extensions first, and then start to add their implicit extensions.
  202. We can add arch string extensions in order by the original
  203. riscv_add_subset, and then add the implicit subsets by the
  204. riscv_add_implicit_subset. Besides, do not add the implicit
  205. extensions if we failed to find their default versions.
  206. (riscv_parse_std_ext): Updated.
  207. (riscv_parse_add_implicit_subsets): New function. Add all implicit
  208. extensions according to the arch string extensions.
  209. (riscv_parse_subset): Call riscv_init_ext_order and
  210. riscv_parse_add_implicit_subsets, before and after parsing the
  211. arch string. Remove parts of the ISA conflict checking since
  212. the implicit extensions are added.
  213. * elfxx-riscv.h (riscv_lookup_subset): Updated.
  214. 2020-12-01 Nelson Chu <nelson.chu@sifive.com>
  215. * elfxx-riscv.c (riscv_lookup_subset): Moved to front.
  216. (riscv_add_subset): Likewise.
  217. (riscv_release_subset_list): Likewise.
  218. (riscv_parse_add_subset): New function. Find and check the
  219. versions before adding them by riscv_add_subset.
  220. (riscv_parsing_subset_version): Remove use_default_version
  221. and change the version type from unsigned to int. Set the
  222. versions to RISCV_UNKNOWN_VERSION if we can not find them
  223. in the arch string.
  224. (riscv_parse_std_ext): Updated.
  225. (riscv_parse_prefixed_ext): Updated. Since we use as_bad
  226. rather than as_fatal to report more errors, return NULL
  227. string if the parsed end_of_version is NULL, too.
  228. (riscv_parse_subset): Use a new boolean, no_conflict, to
  229. report more errors when we have more than one ISA conflicts.
  230. * elfxx-riscv.h (RISCV_DONT_CARE_VERSION): Changed to
  231. RISCV_UNKNOWN_VERSION.
  232. (riscv_lookup_subset_version): Removed.
  233. (riscv_parse_subset_t): Updated.
  234. 2020-12-01 Nelson Chu <nelson.chu@sifive.com>
  235. * elfxx-riscv.c (riscv_parse_std_ext): Stop parsing standard
  236. extensions when parsed h keyword.
  237. (riscv_get_prefix_class): Support prefixed h class.
  238. (riscv_std_h_ext_strtab): Likewise.
  239. (riscv_ext_h_valid_p): Likewise.
  240. (parse_config): Likewise.
  241. (riscv_std_z_ext_strtab): Add zifencei.
  242. * elfxx-riscv.h (riscv_isa_ext_class): Add RV_ISA_CLASS_H.
  243. 2020-12-01 Nelson Chu <nelson.chu@sifive.com>
  244. * elfxx-riscv.c (riscv_parse_subset): ISA string cannot contain
  245. any uppercase letter.
  246. 2020-12-01 Nelson Chu <nelson.chu@sifive.com>
  247. * elfxx-riscv.c: Re-indent codes, unify and improve the error
  248. messages and comments.
  249. (riscv_parse_prefixed_ext): Stop parsing the prefixed class
  250. extensions if the class is RV_ISA_CLASS_UNKNOWN, I get internal
  251. errors before adding this check for march-fail-porder* testcases.
  252. (riscv_parse_subset): Move the rv32 with q checking in front.
  253. * elfxx-riscv.h: Likewise.
  254. 2020-12-01 Alan Modra <amodra@gmail.com>
  255. PR 26979
  256. * elf-bfd.h (elf_backend_merge_symbol_attribute): Update prototype.
  257. * elf32-m68hc1x.h (elf32_m68hc11_merge_symbol_attribute): Likewise.
  258. * elfxx-mips.h (_bfd_mips_elf_merge_symbol_attribute): Likewise.
  259. * elfxx-x86.h (_bfd_x86_elf_merge_symbol_attribute): Likewise.
  260. * elf32-m68hc1x.c (elf32_m68hc11_merge_symbol_attribute): Replace
  261. isym parameter with st_other. Adjust code.
  262. * elf64-alpha.c (elf64_alpha_merge_symbol_attribute): Likewise.
  263. * elf64-ppc.c (ppc64_elf_merge_symbol_attribute): Likewise.
  264. * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): Likewise.
  265. * elfxx-mips.c (_bfd_mips_elf_merge_symbol_attribute): Likewise.
  266. * elfxx-x86.c (_bfd_x86_elf_merge_symbol_attribute): Likewise.
  267. * elflink.c (elf_merge_st_other): Likewise.
  268. (_bfd_elf_merge_symbol, elf_link_add_object_symbols): Adjust to suit.
  269. (_bfd_elf_copy_link_hash_symbol_type): Likewise.
  270. (_bfd_elf_add_default_symbol): Merge st_other from undecorated
  271. symbol and @VER symbol to @@VER symbol.
  272. 2020-11-28 Alan Modra <amodra@gmail.com>
  273. PR 26907
  274. * elf.c (elf_sort_sections): Don't sort zero size !load sections
  275. after load sections.
  276. 2020-11-27 Jozef Lawrynowicz <jozef.l@mittosystems.com>
  277. * elf.c (special_sections_g): Add .gnu.linkonce.n and .gnu.linkonce.p.
  278. (special_sections_n): Add .noinit.
  279. (special_sections_p): Add .persistent.
  280. 2020-11-26 Nick Clifton <nickc@redhat.com>
  281. PR 26946
  282. * dwarf2.c (read_section): Check for debug sections with excessive
  283. sizes.
  284. 2020-11-25 H.J. Lu <hongjiu.lu@intel.com>
  285. PR ld/26936
  286. * elflink.c (_bfd_elf_check_kept_section): Get the real kept
  287. section.
  288. 2020-11-23 Nick Clifton <nickc@redhat.com>
  289. PR 26931
  290. * elf-bfd.h (struct elf_backend_data): Add bfd_boolean field to
  291. slurp_secondary_relocs field.
  292. (_bfd_elf_slurp_secondary_reloc_section): Update prototype.
  293. * elf.c (_bfd_elf_slurp_secondary_reloc_section): Add new
  294. parameter. Compute number of symbols based upon the new
  295. parameter.
  296. * elfcode.h (elf_slurp_reloc_table): Pass dynamic as new
  297. parameter.
  298. 2020-11-23 H.J. Lu <hongjiu.lu@intel.com>
  299. PR ld/26918
  300. * elf64-s390.c (elf_s390_finish_dynamic_sections): Set .got
  301. sh_entsize only if .got size > 0.
  302. 2020-11-21 Nelson Chu <nelson.chu@sifive.com>
  303. * elfnn-riscv.c (_bfd_riscv_relax_section): Add a new relax pass
  304. to do the pcgp relaxation later, after the lui and call relaxations,
  305. but before the delete and alignment relaxations.
  306. 2020-11-20 Nick Alcock <nick.alcock@oracle.com>
  307. * elflink.c (elf_finalize_dynstr): Call examine_strtab after
  308. dynstr finalization.
  309. (elf_link_swap_symbols_out): Don't call it here. Call
  310. ctf_new_symbol before swap_symbol_out.
  311. (elf_link_output_extsym): Call ctf_new_dynsym before
  312. swap_symbol_out.
  313. (bfd_elf_final_link): Likewise.
  314. * elf.c (swap_out_syms): Pass in bfd_link_info. Call
  315. ctf_new_symbol before swap_symbol_out.
  316. (_bfd_elf_compute_section_file_positions): Adjust.
  317. 2020-11-19 Nick Clifton <nickc@redhat.com>
  318. PR 26918
  319. * elf64-s390.c (elf_s390_finish_dynamic_sections): Check for the
  320. existance of an sgot output section before setting the
  321. sh_entsize.
  322. 2020-11-18 Jozef Lawrynowicz <jozef.l@mittosystems.com>
  323. H.J. Lu <hongjiu.lu@intel.com>
  324. * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_retain.
  325. (struct elf_obj_tdata): Increase has_gnu_osabi to 4 bits.
  326. * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_retain
  327. for SHF_GNU_RETAIN.
  328. (_bfd_elf_final_write_processing): Report if SHF_GNU_RETAIN is
  329. not supported by the OSABI.
  330. Adjust error messages.
  331. * elflink.c (elf_link_input_bfd): Copy enabled has_gnu_osabi bits from
  332. input BFD to output BFD.
  333. (bfd_elf_gc_sections): gc_mark the section if SHF_GNU_RETAIN is set.
  334. 2020-11-16 Przemyslaw Wirkus <przemyslaw.wirkus@arm.com>
  335. * cpu-arm.c (processors): Add Cortex-A78C.
  336. 2020-11-11 Tom Tromey <tromey@adacore.com>
  337. * archive.c (getuid, getgid): Move...
  338. * sysdep.h (getuid, getgid): ...here.
  339. 2020-11-09 Alan Modra <amodra@gmail.com>
  340. * vms-alpha.c (alpha_vms_write_exec): Write 16 bits to eihd.alias.
  341. 2020-11-09 Alan Modra <amodra@gmail.com>
  342. * archive.c (bfd_ar_hdr_from_filesystem): Use bfd_set_input_error
  343. when stat of archive member fails.
  344. * coff-rs6000.c (xcoff_write_archive_contents_old),
  345. (xcoff_write_archive_contents_big): Likewise, and handle in-memory
  346. bfd.
  347. 2020-11-03 Alan Modra <amodra@gmail.com>
  348. * elf.c (bfd_section_from_shdr): Free sections_being_created.
  349. Use bfd_zmalloc.
  350. 2020-11-02 Alan Modra <amodra@gmail.com>
  351. PR 15146
  352. PR 26314
  353. PR 26530
  354. PR 26806
  355. * elflink.c (elf_link_add_object_symbols): Don't set def/ref flags
  356. for plugin syms. Do allow plugin syms to mark as-needed libs.
  357. 2020-10-30 H.J. Lu <hongjiu.lu@intel.com>
  358. PR gas/26703
  359. * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Generate
  360. GNU_PROPERTY_X86_ISA_1_BASELINE for -z x86-64-baseline.
  361. 2020-10-29 Nick Clifton <nickc@redhat.com>
  362. PR 26809
  363. * elf.c (_bfd_elf_slurp_secondary_reloc_section): Use the correct
  364. sized reloc reading function.
  365. (_bfd_elf_write_secondary_reloc_section): Use the correct sized
  366. reloc writing function.
  367. 2020-10-28 Nick Clifton <nickc@redhat.com>
  368. PR 26774
  369. * srec.c (srec_write_symbols): Do not emit symbols in sections
  370. that have been removed from the output.
  371. 2020-10-27 Nick Clifton <nickc@redhat.com>
  372. * elf64-hppa.c (elf_hppa_final_link_relocate): Check that the
  373. symbol's section is being output before adding its offset to the
  374. addend when processing R_PARISC_SECREL32.
  375. 2020-10-25 Alan Modra <amodra@gmail.com>
  376. * vms-misc.c (_bfd_vms_save_counted_string): Count length byte
  377. towards maxlen.
  378. 2020-10-20 Dr. David Alan Gilbert <dgilbert@redhat.com>
  379. * po/es.po: Fix printf format.
  380. 2020-10-16 Nelson Chu <nelson.chu@sifive.com>
  381. * elfnn-riscv.c (riscv_elf_link_hash_table): Add last_iplt_index.
  382. (riscv_elf_size_dynamic_sections): Initialize the last_iplt_index.
  383. (riscv_elf_relocate_section): Use riscv_elf_append_rela.
  384. (riscv_elf_finish_dynamic_symbol): If the use_elf_append_rela is
  385. false, then we should add the dynamic relocs from the last of
  386. the .rela.iplt, and don't use the riscv_elf_append_rela to add.
  387. 2020-10-16 Nelson Chu <nelson.chu@sifive.com>
  388. * elfnn-riscv.c: Include "objalloc.h" since we need objalloc_alloc.
  389. (riscv_elf_link_hash_table): Add loc_hash_table and loc_hash_memory
  390. for local STT_GNU_IFUNC symbols.
  391. (riscv_elf_got_plt_val): Removed.
  392. (riscv_elf_local_htab_hash, riscv_elf_local_htab_eq): New functions.
  393. Use to compare local hash entries.
  394. (riscv_elf_get_local_sym_hash): New function. Find a hash entry for
  395. local symbol, and create a new one if needed.
  396. (riscv_elf_link_hash_table_free): New function. Destroy an riscv
  397. elf linker hash table.
  398. (riscv_elf_link_hash_table_create): Create hash table for local ifunc.
  399. (riscv_elf_check_relocs): Create a fake global symbol to track the
  400. local ifunc symbol. Add support to check and handle the relocations
  401. reference to ifunc symbols.
  402. (allocate_dynrelocs): Let allocate_ifunc_dynrelocs and
  403. allocate_local_ifunc_dynrelocs to handle the ifunc symbols if they
  404. are defined and referenced in a non-shared object.
  405. (allocate_ifunc_dynrelocs): New function. Allocate space in .plt,
  406. .got and associated reloc sections for ifunc dynamic relocs.
  407. (allocate_local_ifunc_dynrelocs): Likewise, but for local ifunc
  408. dynamic relocs.
  409. (riscv_elf_relocate_section): Add support to handle the relocation
  410. referenced to ifunc symbols.
  411. (riscv_elf_size_dynamic_sections): Updated.
  412. (riscv_elf_adjust_dynamic_symbol): Updated.
  413. (riscv_elf_finish_dynamic_symbol): Finish up the ifunc handling,
  414. including fill the PLT and GOT entries for ifunc symbols.
  415. (riscv_elf_finish_local_dynamic_symbol): New function. Called by
  416. riscv_elf_finish_dynamic_symbol to handle the local ifunc symbols.
  417. (_bfd_riscv_relax_section): Don't do the relaxation for ifunc.
  418. * elfxx-riscv.c: Add R_RISCV_IRELATIVE.
  419. * configure.ac: Link elf-ifunc.lo to use the generic ifunc support.
  420. * configure: Regenerated.
  421. 2020-10-16 Alan Modra <amodra@gmail.com>
  422. * elf32-arc.c (replace_func): Correct return type.
  423. (get_replace_function): Use a replace_func function pointer rather
  424. than void*. Update associated ARC_RELOC_HOWTO define.
  425. 2020-10-16 Alan Modra <amodra@gmail.com>
  426. * elf32-cr16.c: Formatting.
  427. (cr16_elf_final_link_relocate): Sign extend rather than clumsy
  428. "add or subtract" of offset value. Simplify range checks. Move
  429. common code out of "if" branches. Don't refetch insn fields
  430. needlessly.
  431. 2020-10-16 Alan Modra <amodra@gmail.com>
  432. * elf64-ppc.c (ppc64_elf_relocate_section): Tighten sanity check
  433. on R_PPC64_GOT_LO_DS and R_PPC64_GOT_HA instructions.
  434. 2020-10-09 Alan Modra <amodra@gmail.com>
  435. * elf64-ppc.c (write_plt_relocs_for_local_syms): Don't do local
  436. entry offset optimisation.
  437. 2020-10-09 H.J. Lu <hongjiu.lu@intel.com>
  438. PR gas/26703
  439. * elf-linker-x86.h (elf_linker_x86_params): Add isa_level.
  440. * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Merge
  441. GNU_PROPERTY_X86_ISA_1_V[234].
  442. (_bfd_x86_elf_link_setup_gnu_properties): Generate
  443. GNU_PROPERTY_X86_ISA_1_V[234] for -z x86-64-v[234].
  444. 2020-10-06 H.J. Lu <hongjiu.lu@intel.com>
  445. PR ld/26711
  446. * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Merge -z ibt
  447. and -z shstk only with GNU_PROPERTY_X86_FEATURE_1_AND.
  448. 2020-10-06 Brandon Bergren <bdragon@FreeBSD.org>
  449. * config.bfd: Add powerpc64le-*-freebsd*.
  450. * configure.ac: Add powerpc_elf64_fbsd_le_vec.
  451. * elf64-ppc.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Define for
  452. freebsd.
  453. * targets.c (powerpc_elf64_fbsd_le_vec): Declare.
  454. (_bfd_target_vector): Add it.
  455. * configure: Regenerate.
  456. 2020-10-05 Kamil Rytarowski <n54@gmx.com>
  457. * config.bfd (aarch64-*-netbsd*, aarch64_be-*-netbsd*): Add target.
  458. 2020-10-05 Nick Clifton <nickc@redhat.com>
  459. PR 26253
  460. * elf.c (_bfd_elf_setup_sections): Do not complain about an
  461. sh_link value of zero when the SLF_LINK_ORDER flag is set.
  462. (assign_section_numbers): Likewise.
  463. 2020-10-02 H.J. Lu <hongjiu.lu@intel.com>
  464. PR 26681
  465. * elflink.c (bfd_elf_gc_sections): Do not arbitrarily keep note
  466. sections which are linked to another section.
  467. 2020-09-30 Przemyslaw Wirkus <przemyslaw.wirkus@arm.com>
  468. * cpu-arm.c: Add cortex-a78 and cortex-a78ae.
  469. 2020-09-28 Przemyslaw Wirkus <przemyslaw.wirkus@arm.com>
  470. * cpu-arm.c: (processors) Add Cortex-X1.
  471. 2020-09-28 Alan Modra <amodra@gmail.com>
  472. PR 26656
  473. * elf64-ppc.c (ppc_build_one_stub, ppc_size_one_stub): Check for
  474. NULL stub_entry->h before calling is_tls_get_addr.
  475. 2020-09-26 Alan Modra <amodra@gmail.com>
  476. * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Depend on has_plt_localentry0.
  477. (LD_R0_0R11, ADD_R11_R0_R11): Define.
  478. (ppc64_elf_tls_setup): Disable params->plt_localentry0 when power10
  479. code detected.
  480. (ppc64_elf_size_stubs): Update __glink_PLTresolve eh_frame.
  481. (ppc64_elf_build_stubs): Move r2 save to start of __glink_PLTresolve,
  482. and only emit for has_plt_localentry0. Don't use r2 in the stub.
  483. 2020-09-24 Alan Modra <amodra@gmail.com>
  484. PR 26656
  485. * elf64-ppc.c (plt_stub_size): Add "odd" param. Use it with
  486. size_power10_offset rather than calculating from start of stub.
  487. Add size for notoc tls_get_addr_opt stub.
  488. (plt_stub_pad): Add "odd" param, pass to plt_stub_size.
  489. (build_tls_get_addr_head, build_tls_get_addr_tail): New functions.
  490. (build_tls_get_addr_stub): Delete.
  491. (ppc_build_one_stub): Use a temp for htab->params->stub_bfd.
  492. Emit notoc tls_get_addr_opt stub. Move eh_frame code to
  493. suit. Adjust code to use bfd_tls_get_addr_head/tail in place
  494. of build_tls_get_addr_stub.
  495. (ppc_size_one_stub): Size notoc tls_get_addr_opt stub.
  496. Adjust plt_stub_size and plt_stub_pad calls. Correct "odd"
  497. when padding stub. Size eh_frame for notoc stub too.
  498. Correct lr_restore value.
  499. (ppc64_elf_relocate_section): Don't skip over first insn of
  500. notoc tls_get_addr_opt stub.
  501. 2020-09-24 Alan Modra <amodra@gmail.com>
  502. PR 26655
  503. * elf64-ppc.c (ppc64_elf_func_desc_adjust): Rename to..
  504. (ppc64_elf_edit): Call params->edit.
  505. (ppc64_elf_tls_setup): Don't call _bfd_elf_tls_setup. Return a
  506. bfd_boolean.
  507. * elf64-ppc.h (struct ppc64_elf_params): Add "edit".
  508. (ppc64_elf_tls_setup): Update declaration.
  509. 2020-09-21 Alan Modra <amodra@gmail.com>
  510. PR 26569
  511. * elfxx-riscv.c (howto_table): Correct size and bitsize of
  512. R_RISCV_RVC_BRANCH, R_RISCV_RVC_JUMP, and R_RISCV_RVC_LUI.
  513. Correct size for R_RISCV_TLS_DTPMOD32, R_RISCV_TLS_DTPREL32,
  514. R_RISCV_CALL, and R_RISCV_CALL_PLT. Make R_RISCV_TPREL_ADD and
  515. R_RISCV_ALIGN like R_RISCV_NONE. Correct dst_mask many relocs.
  516. 2020-09-17 Mikael Pettersson <mikpelinux@gmail.com>
  517. PR ld/18808
  518. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Skip IFUNC
  519. relocations in debug sections, change abort to _bfd_error_handler.
  520. 2020-09-16 H.J. Lu <hongjiu.lu@intel.com>
  521. PR ld/26583
  522. * config.bfd (targ64_selvecs, targ_selvecs): Add x86_64_pe_vec
  523. to x86_64_pei_vec.
  524. * reloc.c: Include "coff/internal.h".
  525. (bfd_perform_relocation): Adjust relocation for PE/x86-64 inputs.
  526. 2020-09-16 Alan Modra <amodra@gmail.com>
  527. * elf-bfd.h (elf_symbol_from): Remove unused ABFD parameter.
  528. * elf.c (ignore_section_sym, _bfd_elf_copy_private_symbol_data),
  529. (swap_out_syms): Adjust elf_symbol_from invocation.
  530. 2020-09-16 Alan Modra <amodra@gmail.com>
  531. PR 26623
  532. * elf-bfd.h (elf_symbol_from): Exclude synthetic symbols.
  533. 2020-09-15 H.J. Lu <hongjiu.lu@intel.com>
  534. * coff-x86_64.c (howto_table): Display PE relocation names.
  535. 2020-09-15 Hans-Peter Nilsson <hp@axis.com>
  536. PR ld/26589
  537. * elf32-cris.c (cris_elf_check_relocs): Add missing NULL check
  538. on argument before calling UNDEFWEAK_NO_DYNAMIC_RELOC.
  539. 2020-09-12 H.J. Lu <hongjiu.lu@intel.com>
  540. PR ld/26391
  541. * elflink.c (elf_final_link_info): Add local_hash_table.
  542. (local_hash_entry): New.
  543. (local_hash_newfunc): Likewise.
  544. (elf_link_output_symstrtab): Append ".COUNT" to duplicated local
  545. symbols.
  546. (bfd_elf_final_link): Initialize and free local_hash_table for
  547. "-z unique-symbol".
  548. 2020-09-10 Siddhesh Poyarekar <siddesh.poyarekar@arm.com>
  549. * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Revert
  550. changes in 7e05773767820b441b23a16628b55c98cb1aef46. Set
  551. error for undefined symbol in BFD_RELOC_AARCH64_BRANCH19 and
  552. BFD_RELOC_AARCH64_TSTBR14 relocations.
  553. 2020-09-09 Nick Clifton <nickc@redhat.com>
  554. * cofflink.c (coff_link_check_archive_element): Move the check for
  555. coff type input to the start of the function.
  556. 2020-09-09 Alan Modra <amodra@gmail.com>
  557. * libbfd-in.h (_bfd_write_unsigned_leb128): Declare.
  558. * libbfd.h: Regenerate.
  559. 2020-09-08 Jozef Lawrynowicz <jozef.l@mittosystems.com>
  560. Kuan-Lin Chen <kuanlinchentw@gmail.com>
  561. * bfd-in2.h (bfd_reloc_code_real): Add
  562. BFD_RELOC_MSP430_{SET,SUB}_ULEB128.
  563. * elf32-msp430.c (msp430_elf_ignore_reloc): New.
  564. (elf_msp430_howto_table): Add R_MSP430{,X}_GNU_{SET,SUB}_ULEB128.
  565. (msp430_reloc_map): Add R_MSP430_GNU_{SET,SUB}_ULEB128.
  566. (msp430x_reloc_map): Add R_MSP430X_GNU_{SET,SUB}_ULEB128.
  567. (write_uleb128): New.
  568. (msp430_final_link_relocate): Handle R_MSP430{,X}_GNU_{SET,SUB}_ULEB128.
  569. * libbfd.c (_bfd_write_unsigned_leb128): New.
  570. * libbfd.h (_bfd_write_unsigned_leb128): New prototype.
  571. Add BFD_RELOC_MSP430_{SET,SUB}_ULEB128.
  572. * reloc.c: Document BFD_RELOC_MSP430_{SET,SUB}_ULEB128.
  573. 2020-09-08 Alex Coplan <alex.coplan@arm.com>
  574. * archures.c (bfd_mach_aarch64_8R): New.
  575. * bfd-in2.h: Regenerate.
  576. * cpu-aarch64.c (bfd_aarch64_arch_v8_r): New.
  577. (bfd_aarch64_arch_ilp32): Update tail pointer.
  578. 2020-09-08 Alan Modra <amodra@gmail.com>
  579. PR 13250
  580. PR 26580
  581. * elflink.c (_bfd_elf_merge_symbol): Make "override" a bfd**.
  582. Return oldbfd in override when old common should override new
  583. common.
  584. (_bfd_elf_add_default_symbol): Adjust to suit.
  585. (elf_link_add_object_symbols): Likewise. Pass "override" to
  586. _bfd_generic_link_add_one_symbol. Save and restore common u.c.p
  587. field for --as-needed shared libraries. Revert pr13250 changes.
  588. 2020-09-08 Nick Clifton <nickc@redhat.com>
  589. * plugin.c (bfd_plugin_canonicalize_symtab): Handle the case of an
  590. unrecognized symbol type in a weak definition.
  591. 2020-09-04 Alan Modra <amodra@gmail.com>
  592. PR 26574
  593. * elfcode.h (elf_object_p): Sanity check section header offset.
  594. * elf.c (_bfd_elf_slurp_secondary_reloc_section): Sanity check
  595. sh_entsize.
  596. 2020-09-04 Alan Modra <amodra@gmail.com>
  597. PR 15146
  598. PR 26314
  599. PR 26530
  600. * elflink.c (elf_link_add_object_symbols): Do set def_regular
  601. and ref_regular for IR symbols. Don't clear dynsym, allowing
  602. IR symbols to load --as-needed shared libraries, but prevent
  603. IR symbols from becoming dynamic.
  604. 2020-09-03 Nick Clifton <nickc@redhat.com>
  605. PR 26521
  606. * elf.c (_bfd_elf_write_secondary_reloc_section): Check for
  607. secondary reloc sections with a zero sh_entsize field.
  608. 2020-09-03 Nelson Chu <nelson.chu@sifive.com>
  609. * elfnn-riscv.c (riscv_i_or_e_p): Minor cleanup for warnings/errors.
  610. (riscv_merge_std_ext): Likewise.
  611. (riscv_merge_arch_attr_info): Likewise.
  612. (riscv_merge_attributes): Likewise and fix comment typos.
  613. 2020-09-03 Nelson Chu <nelson.chu@sifive.com>
  614. * elfnn-riscv.c (riscv_version_mismatch): Change the return type
  615. from void to bfd_boolean. Report warnings rather than errors
  616. when the ISA versions are mis-matched. Afterwards, remember to
  617. update the output ISA versions to the newest ones.
  618. (riscv_merge_std_ext): Allow to link objects with different
  619. standard ISA versions. Try to add output ISA versions to
  620. merged_subsets first.
  621. (riscv_merge_multi_letter_ext): Likewise. But for standard additional
  622. ISA and non-standard ISA versions.
  623. 2020-09-03 Kito Cheng <kito.cheng@sifive.com>
  624. * elfnn-riscv.c (riscv_merge_std_ext): Fix to report the correct
  625. error message when the versions of extension are mis-matched.
  626. * elfxx-riscv.c (riscv_parse_subset): Don't issue the error when
  627. the string is empty.
  628. 2020-09-03 Alan Modra <amodra@gmail.com>
  629. * xcofflink.c (xcoff_get_archive_info): Allocate xcoff_archive_info
  630. on the output bfd objalloc memory.
  631. 2020-09-02 Alan Modra <amodra@gmail.com>
  632. * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Correct type
  633. of constant shifted left.
  634. 2020-09-02 Alan Modra <amodra@gmail.com>
  635. * elf32-pru.c (pru_elf32_do_ldi32_relocate): Use an unsigned
  636. type for "relocation".
  637. 2020-09-01 Alan Modra <amodra@gmail.com>
  638. * reloc.c (N_ONES): Handle N=0.
  639. * elf32-arm.c (elf32_arm_howto_table_1): Set complain_overflow_dont
  640. for R_ARM_TLS_DESCSEQ and R_ARM_THM_TLS_DESCSEQ.
  641. 2020-09-01 Alan Modra <amodra@gmail.com>
  642. PR 26429
  643. * elf32-arm.c (elf32_arm_allocate_local_sym_info): Allocate arrays
  644. in descending order of alignment.
  645. 2020-09-01 Alan Modra <amodra@gmail.com>
  646. PR 26423
  647. * elf32-arm.c (calculate_group_reloc_mask): Use 3u in shift.
  648. 2020-08-31 Alan Modra <amodra@gmail.com>
  649. PR 26493
  650. * elfnn-riscv.c (riscv_make_plt_header): Cast PLT_HEADER_SIZE to
  651. unsigned when using with RISCV_ITYPE.
  652. (_bfd_riscv_relax_call): Use an unsigned foff.
  653. 2020-08-31 Alan Modra <amodra@gmail.com>
  654. PR 26476
  655. PR 26477
  656. * elfxx-mips.c (CRINFO_CTYPE, CRINFO_RTYPE, CRINFO_DIST2TO),
  657. (CRINFO_RELVADDR): Make unsigned.
  658. (mips_elf_nullify_got_load): Use unsigned constant when shifting
  659. into sign bit.
  660. 2020-08-31 Alan Modra <amodra@gmail.com>
  661. PR 26466
  662. * mep-relocs.pl (emit_apply): Handle HI16S adjustment. Use "u"
  663. variable and rewrite signed overflow check.
  664. * elf32-mep.c: Regenerate.
  665. (mep_final_link_relocate): Delete "s".
  666. 2020-08-31 Alan Modra <amodra@gmail.com>
  667. PR 26461
  668. * elfxx-ia64.c (ia64_elf_install_value): Make expressions unsigned
  669. that might shift values into sign bit.
  670. 2020-08-31 Alan Modra <amodra@gmail.com>
  671. PR 26445
  672. * elf32-csky.c (csky_relocate_contents): Make relocation a bfd_vma,
  673. and similarly for variables dealing with overflow.
  674. 2020-08-31 Alan Modra <amodra@gmail.com>
  675. PR 26442
  676. * elf32-crx.c (crx_elf_final_link_relocate): Calculate reloc_bits
  677. without undefined behaviour. Tidy excess casts.
  678. 2020-08-31 Alan Modra <amodra@gmail.com>
  679. * elf-m10300.c (mn10300_elf_relax_delete_bytes): Calculate
  680. alignment from reloc addend after reloc type R_MN10300_ALIGN is
  681. found.
  682. 2020-08-30 Alan Modra <amodra@gmail.com>
  683. PR 26435
  684. PR 26436
  685. * elf32-cr16.c (cr16_elf_final_link_relocate): Calculate reloc_bits
  686. without undefined behaviour.
  687. 2020-08-29 Nick Clifton <nickc@redhat.com>
  688. PR 26520
  689. * dwarf2.c (scan_unit_for_symbols): Add member entries to the
  690. variable table.
  691. 2020-08-29 Alan Modra <amodra@gmail.com>
  692. PR 26459
  693. * elfnn-ia64.c (get_dyn_sym_info): Don't bsearch or look at last
  694. element when count is zero. bfd_realloc when shrinking.
  695. 2020-08-28 Alan Modra <amodra@gmail.com>
  696. PR 26418
  697. * ecofflink.c (bfd_ecoff_write_accumulated_debug): Don't write
  698. zero size buffers.
  699. 2020-08-28 Alan Modra <amodra@gmail.com>
  700. PR 26418
  701. * ecofflink.c (WRITE): Really don't write zero size chunks.
  702. 2020-08-28 Tuckker <tuckkern+sourceware@gmail.com>
  703. PR 26543
  704. * linker.c (bfd_generic_define_common_symbol): Force the alignment
  705. to 1 if the section has now alignment requirement.
  706. 2020-08-28 Cooper Qu <cooper.qu@linux.alibaba.com>
  707. * elf32-csky.c (csky_archs): Fix arch names.
  708. (csky_find_arch_with_name): New.
  709. (elf32_csky_merge_attributes): New.
  710. (csky_elf_merge_private_bfd_data): Add process of merge
  711. attribute section.
  712. (elf32_csky_obj_attrs_arg_type): New.
  713. (elf32_csky_obj_attrs_handle_unknown): New.
  714. (elf_backend_obj_attrs_vendor): Define.
  715. (elf_backend_obj_attrs_section): Define.
  716. (elf_backend_obj_attrs_arg_type): Define.
  717. (elf_backend_obj_attrs_section_type): Define.
  718. 2020-08-28 Nick Clifton <nickc@redhat.com>
  719. PR19011
  720. * cofflink.c (_bfd_coff_generic_relocate_section): Provide a value
  721. for undefined symbols which will not generate extra warning
  722. messages about truncated relocs.
  723. 2020-08-28 Nelson Chu <nelson.chu@sifive.com>
  724. * elfnn-riscv.c (riscv_elf_check_relocs): Treat R_RISCV_CALL
  725. and R_RISCV_CALL_PLT as the same in the riscv_elf_check_relocs.
  726. (riscv_elf_relocate_section): Remove the R_RISCV_CALL for the
  727. unresolved reloc checks.
  728. 2020-08-27 John David Anglin <danglin@gcc.gnu.org>
  729. PR 26356
  730. * som.c (som_bfd_copy_private_section_data): Issue error when a
  731. subspace is specified without its containing space.
  732. 2020-08-27 Alan Modra <amodra@gmail.com>
  733. PR 26469
  734. * elflink.c: Include limits.h.
  735. (CHAR_BIT): Provide fallback define.
  736. (set_symbol_value): Correct complex reloc comment.
  737. (undefined_reference): Set bfd_error.
  738. (BINARY_OP_HEAD, BINARY_OP_TAIL): Split out from..
  739. (BINARY_OP): ..this.
  740. (eval_symbol): Limit shifts. Force unsigned for left shift.
  741. Catch divide by zero.
  742. * configure.ac (AC_CHECK_HEADERS): Combine, sort and add limits.h.
  743. * configure: Regenerate.
  744. * config.in: Regenerate.
  745. 2020-08-27 Alan Modra <amodra@gmail.com>
  746. PR 26462
  747. * reloc.c (bfd_check_overflow): Return early if zero bitsize.
  748. 2020-08-27 Alan Modra <amodra@gmail.com>
  749. * elf32-arm.c (elf32_arm_final_link_relocate): Don't segfault
  750. on sym_sec not being output.
  751. 2020-08-27 Alan Modra <amodra@gmail.com>
  752. PR 26416
  753. * elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Correct "dynamic".
  754. 2020-08-26 Nick Clifton <nickc@redhat.com>
  755. PR 26433
  756. * elf32-avr.c (avr_final_link_relocate): Fix undefined shift
  757. behaviour.
  758. (avr_elf32_load_records_from_section): Use bfd_get_16 and
  759. bfd_get_32 to load values from potentially unaligned pointers.
  760. PR 26416
  761. * elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Test for and
  762. ignore local symbols.
  763. (elf64_alpha_relax_got_load): Do not check for local dynamic
  764. symbols.
  765. (OP_LDA, OP_LDAH, OP_LDQ, OP_BR, OP_BSR): Use unsigned constant
  766. values.
  767. (INSN_A) Cast the A parameter to unsigned.
  768. (INSN_AB): Define in terms of INSN_A.
  769. (INSN_ABC): Likewise.
  770. (INSN_ABO): Likewise.
  771. (INSN_AD): Likewise.
  772. PR 26411
  773. * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Use an
  774. unsigned long constant when creating a mask to test for alignment
  775. issues.
  776. 2020-08-26 Alan Modra <amodra@gmail.com>
  777. PR 26507
  778. * elf32-xtensa.c (find_removed_literal): Don't bsearch empty map.
  779. 2020-08-26 Alan Modra <amodra@gmail.com>
  780. PR 26506
  781. * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Return early
  782. when section is empty.
  783. 2020-08-26 Alan Modra <amodra@gmail.com>
  784. PR 26498
  785. * elf32-spu.c (find_function_stack_adjust): Use unsigned vars to
  786. avoid UB left shift.
  787. 2020-08-26 Alan Modra <amodra@gmail.com>
  788. PR 26484
  789. PR 26485
  790. PR 26486
  791. PR 26487
  792. PR 26488
  793. PR 26490
  794. * elf64-ppc.c (is_tls_get_addr): Avoid UB &h->elf when h is NULL.
  795. (ppc64_elf_tls_setup): Likewise.
  796. (branch_reloc_hash_match): Likewise.
  797. (build_plt_stub): Likewise.
  798. (ppc64_elf_relocate_section): Likewise.
  799. 2020-08-26 Alan Modra <amodra@gmail.com>
  800. PR 26478
  801. * mmo.c (mmo_write_symbols_and_terminator): Don't memcpy empty table.
  802. 2020-08-26 Alan Modra <amodra@gmail.com>
  803. PR 26475
  804. * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Check
  805. sstubs->contents != NULL.
  806. 2020-08-26 Alan Modra <amodra@gmail.com>
  807. PR 26453
  808. * som.c (som_prep_for_fixups): Return early when no symbols.
  809. 2020-08-26 Alan Modra <amodra@gmail.com>
  810. PR 26418
  811. * ecofflink.c (WRITE): Don't write size 0 chunks.
  812. 2020-08-26 Alan Modra <amodra@gmail.com>
  813. * bfdio.c (bfd_get_file_size): Don't segv on NULL adata.
  814. 2020-08-26 Alan Modra <amodra@gmail.com>
  815. PR 26415
  816. * vms-misc.c (vms_time_t_to_vms_time): Don't use unsigned short vars.
  817. 2020-08-26 David Faust <david.faust@oracle.com>
  818. * archures.c (bfd_mach_xbpf): Define.
  819. * bfd-in2.h: Regenerate.
  820. * cpu-bpf.c (bfd_xbpf_arch) New.
  821. (bfd_bpf_arch) Update next in list field to point to xbpf arch.
  822. 2020-08-26 Alan Modra <amodra@gmail.com>
  823. * archures.c (bfd_mach_ck860): Define.
  824. 2020-08-25 Mark Wielaard <mark@klomp.org>
  825. * dwarf2.c (struct dwarf2_debug_file): Add dwarf_rnglists_buffer
  826. and dwarf_rnglists_size fields.
  827. (dwarf_debug_sections): Add debug_rnglists.
  828. (dwarf_debug_section_enum): Likewise.
  829. (read_debug_rnglists): New function.
  830. (read_rangelist): New function to call either read_ranges or
  831. read_rnglists. Rename original function to...
  832. (read_ranges): ...this.
  833. (read_rnglists): New function.
  834. 2020-08-25 Alan Modra <amodra@gmail.com>
  835. PR 26505
  836. * elf32-xstormy16.c (xstormy16_elf_relax_section): Check
  837. is_elf_hash_table before accessing elf fields.
  838. 2020-08-25 Alan Modra <amodra@gmail.com>
  839. PR 26482
  840. * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Ignore sections that
  841. won't be output.
  842. 2020-08-25 Alan Modra <amodra@gmail.com>
  843. PR 26463
  844. * elf32-m32c.c (m32c_elf_relax_section): Check is_elf_hash_table
  845. before accessing elf fields.
  846. 2020-08-25 Alan Modra <amodra@gmail.com>
  847. PR 26452
  848. * som.c (som_compute_checksum): XOR 32-bit words in header,
  849. not unsigned long sized words.
  850. 2020-08-25 Alan Modra <amodra@gmail.com>
  851. PR 26430
  852. * elf-nacl.c (nacl_modify_segment_map): Correct alloc size and
  853. amount copied for elf_segment_map defined with one element
  854. sections array.
  855. 2020-08-25 Alan Modra <amodra@gmail.com>
  856. PR 26422
  857. * elf32-arm.c (elf32_arm_final_link_relocate): Use the appropriate
  858. bfd_get_x size function to read addends out of fields. Apply
  859. rightshift adjustment too. Don't apply the now unnecessary
  860. howto->size shift to branch REL addends. Don't refetch R_ARM_ABS8
  861. and R_ARM_ABS16 addends. Don't refetch thumb branch addends.
  862. Correct R_ARM_THM_JUMP6 addend.
  863. 2020-08-25 Alan Modra <amodra@gmail.com>
  864. PR 26419
  865. * elf-m10300.c (mn10300_elf_relax_section): Don't attempt access
  866. before start of section.
  867. 2020-08-25 Alan Modra <amodra@gmail.com>
  868. * elf-m10300.c (elf32_mn10300_hash_table): Test is_elf_hash_table
  869. before accessing elf_hash_table_id.
  870. * elf32-arc.c (elf_arc_hash_table): Likewise.
  871. * elf32-arm.c (elf32_arm_hash_table): Likewise.
  872. * elf32-avr.c (avr_link_hash_table): Likewise.
  873. * elf32-bfin.c (bfinfdpic_hash_table): Likewise.
  874. * elf32-cris.c (elf_cris_hash_table): Likewise.
  875. * elf32-csky.c (csky_elf_hash_table): Likewise.
  876. * elf32-frv.c (frvfdpic_hash_table): Likewise.
  877. * elf32-hppa.c (hppa_link_hash_table): Likewise.
  878. * elf32-lm32.c (lm32_elf_hash_table): Likewise.
  879. * elf32-m32r.c (m32r_elf_hash_table): Likewise.
  880. * elf32-m68hc1x.h (m68hc11_elf_hash_table): Likewise.
  881. * elf32-m68k.c (elf_m68k_hash_table): Likewise.
  882. * elf32-metag.c (metag_link_hash_table): Likewise.
  883. * elf32-microblaze.c (elf32_mb_hash_table): Likewise.
  884. * elf32-nds32.h (nds32_elf_hash_table): Likewise.
  885. * elf32-or1k.c (or1k_elf_hash_table): Likewise.
  886. * elf32-s390.c (elf_s390_hash_table): Likewise.
  887. * elf32-sh.c (sh_elf_hash_table): Likewise.
  888. * elf32-spu.c (spu_hash_table): Likewise.
  889. * elf32-tilepro.c (tilepro_elf_hash_table): Likewise.
  890. * elf32-xtensa.c (elf_xtensa_hash_table): Likewise.
  891. * elf64-alpha.c (alpha_elf_hash_table): Likewise.
  892. * elf64-hppa.c (hppa_link_hash_table): Likewise.
  893. * elf64-ia64-vms.c (elf64_ia64_hash_table): Likewise.
  894. * elf64-s390.c (elf_s390_hash_table): Likewise.
  895. * elfnn-ia64.c (elfNN_ia64_hash_table): Likewise.
  896. * elfnn-riscv.c (riscv_elf_hash_table): Likewise.
  897. * elfxx-mips.c (mips_elf_hash_table): Likewise.
  898. * elfxx-sparc.h (_bfd_sparc_elf_hash_table): Likewise.
  899. * elfxx-tilegx.c (tilegx_elf_hash_table): Likewise.
  900. 2020-08-21 Jon Turney <jon.turney@dronecode.org.uk>
  901. * elf.c (elfcore_grok_win32pstatus): Change name_size to unsigned
  902. int. Use '%u' format with _bfd_error_handler to render it.
  903. 2020-08-25 Alan Modra <amodra@gmail.com>
  904. PR 26489
  905. * elf64-ppc.c (ppc64_elf_size_stubs): Test code_sec->has_toc_reloc
  906. and code_sec->makes_toc_func_call before sec_info[code_sec->id].
  907. 2020-08-25 Alan Modra <amodra@gmail.com>
  908. PR 26492
  909. * elf64-ppc.c (ppc_hash_table): Test is_elf_hash_table before
  910. accessing elf_hash_table_id.
  911. 2020-08-25 Alan Modra <amodra@gmail.com>
  912. PR 26483
  913. * elf32-ppc.c (ppc_elf_hash_table): Test is_elf_hash_table before
  914. accessing elf_hash_table_id.
  915. 2020-08-24 Mark Wielaard <mark@klomp.org>
  916. * dwarf2.c (read_attribute_value): Handle DW_FORM_data16.
  917. (read_formatted_entries): Likewise. And skip zero entry.
  918. 2020-08-24 Cooper Qu <cooper.qu@linux.alibaba.com>
  919. * bfd-in2.h (bfd_mach_ck860): New.
  920. * cpu-csky.c (arch_info_struct): Add item for CK860.
  921. 2020-08-24 Alan Modra <amodra@gmail.com>
  922. * elf32-ppc.c (ppc_elf_check_relocs): Set has_tls_reloc for
  923. high part tprel16 relocs.
  924. (ppc_elf_tls_optimize): Sanity check high part tprel16 relocs.
  925. Clear do_tls_opt on odd instructions.
  926. (ppc_elf_relocate_section): Move TPREL16_HA/LO optimisation later.
  927. Don't sanity check them here.
  928. * elf64-ppc.c (ppc64_elf_check_relocs): Set has_tls_reloc for
  929. high part tprel16 relocs.
  930. (ppc64_elf_tls_optimize): Sanity check high part tprel16 relocs.
  931. Clear do_tls_opt on odd instructions.
  932. (ppc64_elf_relocate_section): Don't sanity check TPREL16_HA.
  933. 2020-08-23 John David Anglin <danglin@gcc.gnu.org>
  934. PR binutils/26357
  935. * configure.ac: Disable plugins by default on 32-bit hppa*-*-hpux*.
  936. * configure: Regenerate.
  937. 2020-08-22 H.J. Lu <hongjiu.lu@intel.com>
  938. PR ld/26382
  939. * elflink.c (elf_link_output_symstrtab): Keep only one '@' for
  940. versioned symbols, which are defined in shared objects, in
  941. symbol string table.
  942. 2020-08-21 Nick Clifton <nickc@redhat.com>
  943. * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan): Only sort
  944. the data map if there are entries in it.
  945. (_bfd_aarch64_erratum_843419_scan): Likewise.
  946. 2020-08-21 Jan Beulich <jbeulich@suse.com>
  947. * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check
  948. last byte of debug dir, not first.
  949. 2020-08-20 Nick Clifton <nickc@redhat.com>
  950. PR 26428
  951. * bfd.c (bfd_update_compression_header): Also set the sh_addralign
  952. field in the ELF header of the compressed sections.
  953. 2020-08-20 Nick Clifton <nickc@redhat.com>
  954. PR 26406
  955. * elf-bfd.h (struct bfd_elf_section_data): Add
  956. has_secondary_relocs field.
  957. * elf.c (_bfd_elf_copy_special_section_fields): Set the
  958. has_secondary_relocs field for sections which have associated
  959. secondary relocs.
  960. * elfcode.h (elf_write_relocs): Only call write_secondary_relocs
  961. on sections which have associated secondary relocs.
  962. 2020-08-15 Alan Modra <amodra@gmail.com>
  963. * elf32-frv.c (elf32_frv_add_symbol_hook): Set SEC_SMALL_DATA on
  964. small common section.
  965. * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
  966. * elf32-microblaze.c (microblaze_elf_add_symbol_hook): Likewise.
  967. * elf32-nds32.c (nds32_elf_add_symbol_hook): Likewise.
  968. * elf32-nios2.c (nios2_elf_add_symbol_hook): Likewise.
  969. * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
  970. * elf32-score.c (s3_bfd_score_elf_add_symbol_hook): Likewise.
  971. * elf32-score7.c (s7_bfd_score_elf_add_symbol_hook): Likewise.
  972. * elf32-tic6x.c (elf32_tic6x_add_symbol_hook): Likewise.
  973. * elf32-v850.c (v850_elf_check_relocs): Likewise.
  974. (v850_elf_add_symbol_hook): Likewise.
  975. * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
  976. * elf64-ia64-vms.c (elf64_ia64_add_symbol_hook): Likewise.
  977. * elfnn-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
  978. * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Likewise.
  979. 2020-08-15 Alan Modra <amodra@gmail.com>
  980. PR 26389
  981. * syms.c (bfd_decode_symclass): Choose 'c' for commons only when
  982. SEC_SMALL_DATA.
  983. * elf32-m32r.c (_bfd_m32r_elf_symbol_processing): Set SEC_SMALL_DATA
  984. on small common section.
  985. * elf32-score.c (s3_bfd_score_elf_symbol_processing): Likewise.
  986. * elf32-score7.c (s7_bfd_score_elf_symbol_processing): Likewise.
  987. * elf32-tic6x.c (elf32_tic6x_symbol_processing): Likewise.
  988. * elf32-v850.c (v850_elf_symbol_processing): Likewise.
  989. * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Likewise.
  990. * ecoff.c (ecoff_set_symbol_info, ecoff_link_add_externals): Likewise.
  991. 2020-08-14 Alan Modra <amodra@gmail.com>
  992. * hash.c (bfd_hash_set_default_size): Use higher_prime_number
  993. rather than another copy of primes. Increase maximum default
  994. size allowed.
  995. 2020-08-13 Alan Modra <amodra@gmail.com>
  996. * config.bfd: Obsolete arm*-*-symbianelf*, and ia64*-*-*.
  997. 2020-08-13 Alan Modra <amodra@gmail.com>
  998. * elf64-ppc.h (struct ppc64_elf_params): Add no_pcrel_opt.
  999. * elf64-ppc.c (ppc64_elf_relocate_section): Disable GOT reloc
  1000. optimizations when --no-toc-optimize. Disable R_PPC64_PCREL_OPT
  1001. optimization when --no-pcrel-optimize.
  1002. 2020-08-13 Alan Modra <amodra@gmail.com>
  1003. PR 26348
  1004. * bfd.c (struct bfd): Add read_only.
  1005. * elfcode.h (elf_swap_shdr_in): Test both sh_offset and sh_size.
  1006. Set read_only on warning.
  1007. (elf_object_p): Sanity check program header alignment. Set
  1008. read_only on warning.
  1009. * bfd-in2.h: Regenerate.
  1010. 2020-08-12 Jon Turney <jon.turney@dronecode.org.uk>
  1011. * elf.c (elfcore_grok_win32pstatus): Use unsigned int for
  1012. win32pstatus note type to avoid signedness comparison warning.
  1013. 2020-07-21 Jon Turney <jon.turney@dronecode.org.uk>
  1014. * elf.c (elfcore_grok_win32pstatus): Warn on malformed
  1015. win32pstatus notes, and return TRUE so we continue rather than
  1016. stopping as if it was an error.
  1017. 2020-07-01 Jon Turney <jon.turney@dronecode.org.uk>
  1018. * elf.c (elfcore_grok_win32pstatus): Handle NOTE_INFO_MODULE64.
  1019. 2020-07-11 Jon Turney <jon.turney@dronecode.org.uk>
  1020. * elf.c (elfcore_grok_win32pstatus): Don't apply size constraint
  1021. for NOTE_INFO_THREAD to all win32pstatus ELF notes, instead apply
  1022. appropriate size constraint for each win32pstatus note type.
  1023. 2020-07-01 Jon Turney <jon.turney@dronecode.org.uk>
  1024. * elf.c (elfcore_grok_win32pstatus): Don't hardcode the size of
  1025. the Win32 API thread CONTEXT type read from a NOTE_INFO_THREAD
  1026. win32pstatus note.
  1027. 2020-07-11 Jon Turney <jon.turney@dronecode.org.uk>
  1028. * elf.c (NOTE_INFO{_PROCESS,_THREAD,_MODULE}): Define.
  1029. (elfcore_grok_win32pstatus): Use.
  1030. 2020-07-01 Jon Turney <jon.turney@dronecode.org.uk>
  1031. * elf.c (elfcore_grok_win32pstatus): Fix the offset used to read
  1032. the tid from a win32pstatus NOTE_INFO_THREAD ELF note. Fix
  1033. offsets used to read NOTE_INFO_PROCESS.
  1034. 2020-08-12 Nick Clifton <nickc@redhat.com>
  1035. * po/ru.po: Updated Russian translation.
  1036. * po/sr.po: Updated Serbian translation.
  1037. 2020-08-07 David Faust <david.faust@oracle.com>
  1038. * elf64-bpf.c (bpf_elf_relocate_section): Ensure signed division for
  1039. DISP16 and DISP32 relocations.
  1040. 2020-08-05 David Faust <david.faust@oracle.com>
  1041. * elf64-bpf.c (bpf_elf_generic_reloc): New function.
  1042. (bpf_elf_howto_table): Use it here.
  1043. (bpf_elf_relocate_section): Use addends recorded in input_bfd for
  1044. instruction and data relocations.
  1045. 2020-08-03 Alan Modra <amodra@gmail.com>
  1046. * vms-lib.c (vms_traverse_index): Sanity check size remaining
  1047. before accessing vms_idx or vms_elfidx.
  1048. 2020-08-03 Alan Modra <amodra@gmail.com>
  1049. PR 26330
  1050. * elf.c (_bfd_elf_get_symtab_upper_bound): Sanity check symbol table
  1051. size against file size. Correct LONG_MAX limit check.
  1052. (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
  1053. (_bfd_elf_get_reloc_upper_bound): Don't check file size if writing.
  1054. (_bfd_elf_get_dynamic_reloc_upper_bound): Likewise.
  1055. * elf64-x86-64-.c (elf_x86_64_get_synthetic_symtab): Use
  1056. bfd_malloc_and_get_section.
  1057. 2020-07-31 Alan Modra <amodra@gmail.com>
  1058. PR 26314
  1059. * elflink.c (bfd_elf_link_record_dynamic_symbol): Don't allow
  1060. IR symbols to become dynamic.
  1061. (elf_link_add_object_symbols): Don't exclude IR symbols when
  1062. deciding whether an as-needed shared library is needed.
  1063. 2020-07-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
  1064. PR ld/26312
  1065. * elfnn-aarch64.c (elfNN_aarch64_init_small_plt0_entry): Set sh_entsize
  1066. to 0.
  1067. (elfNN_aarch64_finish_dynamic_sections): Remove sh_entsize setting.
  1068. 2020-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
  1069. * bfd.m4 (BFD_SYS_PROCFS_H): New macro.
  1070. (BFD_HAVE_SYS_PROCFS_TYPE): Require BFD_SYS_PROCFS_H.
  1071. Don't define _STRUCTURED_PROC.
  1072. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise.
  1073. * elf.c [HAVE_SYS_PROCFS_H] (_STRUCTURED_PROC): Don't define.
  1074. * configure.ac: Use BFD_SYS_PROCFS_H to check for <sys/procfs.h>.
  1075. * configure, config.in: Regenerate.
  1076. * Makefile.am (AM_CPPFLAGS): Add LARGEFILE_CPPFLAGS.
  1077. * Makefile.in, doc/Makefile.in: Regenerate.
  1078. 2020-07-30 H.J. Lu <hongjiu.lu@intel.com>
  1079. * elf-bfd.h (sym_cache): Moved before elf_link_hash_table.
  1080. (elf_link_hash_table): Add sym_cache.
  1081. * elf32-arm.c (elf32_arm_link_hash_table): Remove sym_cache.
  1082. (elf32_arm_check_relocs): Updated.
  1083. (elf32_arm_size_dynamic_sections): Likewise.
  1084. * elf32-bfin.c (bfin_link_hash_table): Removed.
  1085. (bfin_link_hash_newfunc): Updated.
  1086. (bfin_hash_table): Removed.
  1087. * elf32-csky.c (csky_elf_link_hash_table): Remove sym_cache.
  1088. (csky_elf_check_relocs): Updated.
  1089. * elf32-hppa.c (elf32_hppa_link_hash_table): Remove sym_cache.
  1090. (elf32_hppa_check_relocs): Updated.
  1091. * elf32-i386.c (elf_i386_tls_transition): Updated.
  1092. (elf_i386_convert_load_reloc): Likewise.
  1093. (elf_i386_check_relocs): Likewise.
  1094. * elf32-m32r.c (elf_m32r_link_hash_table): Removed.
  1095. (m32r_elf_hash_table): Updated.
  1096. (m32r_elf_link_hash_table_create): Likewise.
  1097. (m32r_elf_create_dynamic_sections): Likewise.
  1098. (m32r_elf_adjust_dynamic_symbol): Likewise.
  1099. (allocate_dynrelocs): Likewise.
  1100. (m32r_elf_size_dynamic_sections): Likewise.
  1101. (m32r_elf_relocate_section): Likewise.
  1102. (m32r_elf_finish_dynamic_symbol): Likewise.
  1103. (m32r_elf_check_relocs): Likewise.
  1104. * elf32-m68hc1x.h (m68hc11_elf_link_hash_table): Remove
  1105. sym_cache.
  1106. * elf32-m68k.c (elf_m68k_link_hash_table): Likewise.
  1107. (elf_m68k_check_relocs): Updated.
  1108. * elf32-metag.c (elf_metag_link_hash_table): Remove sym_cache.
  1109. (elf_metag_check_relocs): Updated.
  1110. * elf32-microblaze.c (elf32_mb_link_hash_table): Remove sym_sec.
  1111. (microblaze_elf_check_relocs): Updated.
  1112. * elf32-nds32.c (nds32_elf_link_hash_table_create): Likewise.
  1113. (nds32_elf_create_dynamic_sections): Likewise.
  1114. (nds32_elf_adjust_dynamic_symbol): Likewise.
  1115. (nds32_elf_check_relocs): Likewise.
  1116. * elf32-nds32.h (elf_nds32_link_hash_table): Remove sdynbss,
  1117. srelbss and aym_cache.
  1118. * elf32-nios2.c (elf32_nios2_link_hash_table): Remove sym_cache.
  1119. (nios2_elf32_check_relocs): Updated.
  1120. * elf32-or1k.c (elf_or1k_link_hash_table): Remove sym_sec.
  1121. (or1k_elf_check_relocs): Updated.
  1122. * elf32-ppc.c (ppc_elf_check_relocs): Remove sym_cache.
  1123. (ppc_elf_check_relocs): Updated.
  1124. * elf32-s390.c (elf_s390_link_hash_table): Remove sym_cache.
  1125. (elf_s390_check_relocs): Updated.
  1126. (elf_s390_finish_dynamic_sections): Likewise.
  1127. * elf32-sh.c (elf_sh_link_hash_table): Remove sdynbss, srelbss
  1128. and aym_cache.
  1129. (sh_elf_create_dynamic_sections): Updated.
  1130. (sh_elf_adjust_dynamic_symbol): Likewise.
  1131. (sh_elf_size_dynamic_sections): Likewise.
  1132. (sh_elf_check_relocs): Likewise.
  1133. * elf32-tic6x.c (elf32_tic6x_link_hash_table): Remove sym_cache.
  1134. (elf32_tic6x_check_relocs): Updated.
  1135. * elf32-tilepro.c (tilepro_elf_link_hash_table): Removed.
  1136. (tilepro_elf_hash_table): Updated.
  1137. (tilepro_elf_link_hash_table_create): Likewise.
  1138. (tilepro_elf_check_relocs): Likewise.
  1139. (tilepro_elf_adjust_dynamic_symbol): Likewise.
  1140. (allocate_dynrelocs): Likewise.
  1141. (tilepro_elf_size_dynamic_sections): Likewise.
  1142. (tilepro_elf_relocate_section): Likewise.
  1143. (tilepro_elf_finish_dynamic_symbol): Likewise.
  1144. (tilepro_finish_dyn): Likewise.
  1145. (tilepro_elf_finish_dynamic_sections): Likewise.
  1146. * elf64-ppc.c (ppc_link_hash_table): Remove sym_cache.
  1147. (ppc64_elf_before_check_relocs): Updated.
  1148. (ppc64_elf_check_relocs): Likewise.
  1149. * elf64-s390.c (elf_s390_link_hash_table): Remove sym_cache.
  1150. (elf_s390_check_relocs): Updated.
  1151. (elf_s390_relocate_section): Likewise.
  1152. (elf_s390_finish_dynamic_sections): Likewise.
  1153. * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
  1154. (elf_x86_64_check_relocs): Likewise.
  1155. * elfnn-aarch64.c (elf_aarch64_link_hash_table): Remove
  1156. sym_cache.
  1157. (elfNN_aarch64_check_relocs): Updated.
  1158. * elfnn-riscv.c (riscv_elf_link_hash_table): Remove sym_cache.
  1159. (riscv_elf_check_relocs): Updated.
  1160. * elfxx-mips.c (mips_elf_link_hash_table): Remove sym_cache.
  1161. (mips_elf_resolve_got_page_ref): Updated.
  1162. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
  1163. * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Remove
  1164. sym_cache.
  1165. * elfxx-tilegx.c (tilegx_elf_link_hash_table): Likewise.
  1166. (tilegx_elf_check_relocs): Updated.
  1167. * elfxx-x86.h (elf_x86_link_hash_table): Remove sym_cache.
  1168. 2020-07-29 Maciej W. Rozycki <macro@linux-mips.org>
  1169. * elflink.c (bfd_elf_final_link): Give local symbols a name if
  1170. so requested.
  1171. * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): Only
  1172. return TRUE if making ET_REL output.
  1173. 2020-07-29 Maciej W. Rozycki <macro@linux-mips.org>
  1174. * elf-bfd.h (elf_backend_data): Add
  1175. `elf_backend_elfsym_local_is_section' member.
  1176. * elfxx-target.h (elf_backend_elfsym_local_is_section): New
  1177. macro.
  1178. (elfNN_bed): Add `elf_backend_elfsym_local_is_section' member.
  1179. * elflink.c (bfd_elf_final_link): Use it to determine whether
  1180. set the `.symtab' section's `sh_info' value to the index of the
  1181. first non-local or non-section symbol.
  1182. * elf32-mips.c (mips_elf32_elfsym_local_is_section): New
  1183. function.
  1184. (elf_backend_elfsym_local_is_section): New macro.
  1185. * elfn32-mips.c (mips_elf_n32_elfsym_local_is_section): New
  1186. function.
  1187. (elf_backend_elfsym_local_is_section): New macro.
  1188. 2020-07-29 Alan Modra <amodra@gmail.com>
  1189. * elflink.c (bfd_elf_final_link): Don't segfault on local dynsyms
  1190. defined in excluded sections.
  1191. 2020-07-28 Alan Modra <amodra@gmail.com>
  1192. * elf.c (assign_section_numbers): Comment. Don't segfault on
  1193. discarded sections when setting linked-to section for generic
  1194. ELF linker.
  1195. * elflink.c (bfd_elf_match_symbols_in_sections): Allow NULL info.
  1196. 2020-07-27 Alan Modra <amodra@gmail.com>
  1197. * xcofflink.c (xcoff_need_ldrel_p): Accept --just-symbols symbols and
  1198. similar as absolute.
  1199. (bfd_xcoff_import_symbol): Don't fuss over absolute symbol
  1200. redefinitions here.
  1201. 2020-07-24 Nick Clifton <nickc@redhat.com>
  1202. * config.bfd: Move xc16x target to the obsolete list.
  1203. 2020-07-22 Kevin Buettner <kevinb@redhat.com>
  1204. * binary.c (binary_get_section_contents): Seek using offset
  1205. from section's file position.
  1206. 2020-07-22 Kevin Buettner <kevinb@redhat.com>
  1207. * elf.c (_bfd_elf_make_section_from_phdr): Remove hack for GDB.
  1208. 2020-07-22 Max Filippov <jcmvbkbc@gmail.com>
  1209. PR 26246
  1210. * elf32-xtensa.c (removed_literal_compare): Use correct pointer
  1211. type for the first function argument. Rename pointers to reflect
  1212. that they have distinct types.
  1213. 2020-07-20 Alan Modra <amodra@gmail.com>
  1214. * elflink.c (_bfd_elf_gc_keep): Use bfd_is_const_section.
  1215. 2020-07-19 Alan Modra <amodra@gmail.com>
  1216. * elf64-ppc.c (struct ppc_link_hash_table): Add has_power10_relocs.
  1217. (select_alt_stub): New function.
  1218. (ppc_get_stub_entry): Use it here.
  1219. (ppc64_elf_check_relocs): Set had_power10_relocs rather than
  1220. power10_stubs.
  1221. (ppc64_elf_size_stubs): Clear power10_stubs here instead. Don't
  1222. merge notoc stubs with other varieties when power10_stubs is "auto".
  1223. Instead dup the stub hash table entry.
  1224. (plt_stub_size, ppc_build_one_stub, ppc_size_one_stub): Adjust
  1225. tests of power10_stubs.
  1226. 2020-07-15 Alan Modra <amodra@gmail.com>
  1227. PR 26239
  1228. * coffgen.c (_bfd_coff_close_and_cleanup): Free dwarf2 info.
  1229. 2020-07-15 Nick Clifton <nickc@redhat.com>
  1230. PR26240
  1231. * coffgen.c (coff_get_normalized_symtab): Fix off-by-one error in
  1232. check for aux entries that overflow the buufer.
  1233. 2020-07-15 Hans-Peter Nilsson <hp@bitrange.com>
  1234. * elf64-mmix.c (mmix_elf_relax_section): Improve accounting for
  1235. R_MMIX_PUSHJ_STUBBABLE relocs against undefined symbols.
  1236. 2020-07-15 Markus Böck <markus.boeck02@gmail.com>
  1237. Alan Modra <amodra@gmail.com>
  1238. PR 26198
  1239. * coffgen.c (_bfd_coff_section_already_linked): Allow for plugin
  1240. objects both before and after normal object files.
  1241. * elflink.c (_bfd_elf_section_already_linked): Likewise.
  1242. 2020-07-10 Alan Modra <amodra@gmail.com>
  1243. * elf64-ppc.h (struct ppc64_elf_params): Add power10_stubs.
  1244. * elf64-ppc.c (struct ppc_link_hash_table): Delete
  1245. power10_stubs.
  1246. (ppc64_elf_check_relocs): Adjust setting of power10_stubs.
  1247. (plt_stub_size, ppc_build_one_stub, ppc_size_one_stub): Adjust
  1248. uses of power10_stubs.
  1249. 2020-07-09 Alan Modra <amodra@gmail.com>
  1250. * coff-ppc.c: Delete.
  1251. * pe-ppc.c: Delete.
  1252. * pei-ppc.c: Delete.
  1253. * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Remove PE PPC.
  1254. * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Remove
  1255. PPCMAGIC code.
  1256. (coff_write_object_contents): Remove PPC_PE code.
  1257. * config.bfd: Move powerpcle-pe to removed targets.
  1258. * configure.ac: Remove powerpc PE entries.
  1259. * libcoff-in.h (ppc_allocate_toc_section): Delete.
  1260. (ppc_process_before_allocation): Delete.
  1261. * peXXigen.c: Remove POWERPC_LE_PE code and comments.
  1262. * targets.c: Remove powerpc PE vectors.
  1263. * po/SRC-POTFILES.in: Regenerate.
  1264. * libcoff.h: Regenerate.
  1265. * Makefile.in: Regenerate.
  1266. * configure: Regenerate.
  1267. 2020-07-09 Nick Clifton <nickc@redhat.com>
  1268. * po/fr.po: Updated French translation.
  1269. 2020-07-07 Alan Modra <amodra@gmail.com>
  1270. * xcofflink.c (xcoff_mark): Don't mark const sections.
  1271. (bfd_xcoff_record_link_assignment): Add FIXME.
  1272. (_bfd_xcoff_bfd_final_link): Don't segfault on assorted magic
  1273. sections being discarded by linker script.
  1274. 2020-07-07 Alan Modra <amodra@gmail.com>
  1275. * coff-rs6000.c (xcoff_write_archive_contents_old): Set default
  1276. time, uid, gid and mode for deterministic archive.
  1277. (xcoff_write_archive_contents_big): Likewise.
  1278. 2020-07-07 Alan Modra <amodra@gmail.com>
  1279. * coffcode.h (coff_classify_symbol): Handle C_HIDEXT and
  1280. C_AIX_WEAKEXT.
  1281. 2020-07-06 Nick Clifton <nickc@redhat.com>
  1282. * po/pt.po: Updated Portuguese translation.
  1283. * po/uk.po: Updated Ukranian translation.
  1284. 2020-07-04 Nick Clifton <nickc@redhat.com>
  1285. * version.m4: Set version to 2.35.50.
  1286. * configure: Regenerate.
  1287. * po/bbfd.pot: Regenerate.
  1288. 2020-07-04 Nick Clifton <nickc@redhat.com>
  1289. Binutils 2.35 branch created.
  1290. 2020-07-01 Alan Modra <amodra@gmail.com>
  1291. PR 26188
  1292. * coffgen.c (coff_find_nearest_line_with_names): Sanity check
  1293. raw syment index before dereferencing.
  1294. 2020-07-01 Alan Modra <amodra@gmail.com>
  1295. * elf32-i386.c (elf_backend_object_p): Undef for vxworks.
  1296. 2020-07-01 Alan Modra <amodra@gmail.com>
  1297. * config.bfd: Obsolete xc16x.
  1298. 2020-06-30 H.J. Lu <hongjiu.lu@intel.com>
  1299. * archures.c (bfd_mach_i386_nacl): Removed.
  1300. (bfd_mach_i386_i386_nacl): Likewise.
  1301. (bfd_mach_x86_64_nacl): Likewise.
  1302. (bfd_mach_x64_32_nacl): Likewise.
  1303. * config.bfd: Remove *-*-nacl* targets.
  1304. * configure.ac: Remove x86 NaCl target vectors.
  1305. * cpu-i386.c (bfd_arch_i386_onebyte_nop_fill): Removed.
  1306. (bfd_x64_32_nacl_arch): Likewise.
  1307. (bfd_x86_64_nacl_arch): Likewise.
  1308. (bfd_i386_nacl_arch): Likewise.
  1309. (bfd_x64_32_arch_intel_syntax): Updated.
  1310. * elf32-i386.c: Don't include "elf-nacl.h".
  1311. (elf_i386_nacl_plt): Removed.
  1312. (elf_i386_nacl_plt0_entry): Likewise.
  1313. (elf_i386_nacl_plt_entry): Likewise.
  1314. (elf_i386_nacl_pic_plt0_entry): Likewise.
  1315. (elf_i386_nacl_pic_plt_entry): Likewise.
  1316. (elf_i386_nacl_eh_frame_plt): Likewise.
  1317. (elf_i386_nacl_plt): Likewise.
  1318. (elf32_i386_nacl_elf_object_p): Likewise.
  1319. (elf_i386_get_synthetic_symtab): Updated.
  1320. (elf_i386_link_setup_gnu_properties): Likewise.
  1321. * elf64-x86-64.c: Don't include "elf-nacl.h".
  1322. (elf_x86_64_nacl_plt): Removed.
  1323. (elf64_x86_64_nacl_elf_object_p): Likewise.
  1324. (elf_x86_64_nacl_plt0_entry): Likewise.
  1325. (elf_x86_64_nacl_plt_entry): Likewise.
  1326. (elf_x86_64_nacl_eh_frame_plt): Likewise.
  1327. (elf_x86_64_nacl_plt): Likewise.
  1328. (elf32_x86_64_nacl_elf_object_p): Likewise.
  1329. (elf_x86_64_get_synthetic_symtab): Updated.
  1330. (elf_x86_64_link_setup_gnu_properties): Likewise.
  1331. * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
  1332. * targets.c: Remove x86 NaCl target vectors.
  1333. * bfd-in2.h: Regenerated.
  1334. * configure: Likewise.
  1335. 2020-06-29 H.J. Lu <hongjiu.lu@intel.com>
  1336. * elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Call
  1337. _bfd_elf_add_dynamic_tags.
  1338. 2020-06-29 Alan Modra <amodra@gmail.com>
  1339. * peXXigen.c (_bfd_XXi_slurp_codeview_record): Properly check
  1340. return value of bfd_bread. Don't read more than requested length.
  1341. Sanity check length. Properly terminate file name.
  1342. 2020-06-29 Alan Modra <amodra@gmail.com>
  1343. * arc-got.h: Use C style comments.
  1344. * coff-z80.c: Likewise.
  1345. * elf32-csky.c: Likewise.
  1346. * peXXigen.c: Likewise.
  1347. * elf32-m32c.c (m32c_elf_relax_delete_bytes): Remove commented out
  1348. code.
  1349. 2020-06-26 Pat Bernardi <bernardi@adacore.com>
  1350. * elf32-m68k.c (m68k_elf_merge_obj_attributes): New function.
  1351. (elf32_m68k_merge_private_bfd_data): Merge GNU attributes.
  1352. 2020-06-26 Alan Modra <amodra@gmail.com>
  1353. * elfxx-riscv.c (struct priv_spec_t, priv_specs),
  1354. (riscv_get_priv_spec_class, riscv_get_priv_spec_class_from_numbers),
  1355. (riscv_get_priv_spec_name): Move to..
  1356. * cpu-riscv.c: ..here.
  1357. (riscv_get_priv_spec_class_from_numbers): Don't xmalloc temp buffer.
  1358. Use %u to print unsigned numbers.
  1359. 2020-06-24 Andrew Burgess <andrew.burgess@embecosm.com>
  1360. * cpu-riscv.c (riscv_scan): Don't allow shorter matches using the
  1361. default architecture.
  1362. 2020-06-24 H.J. Lu <hongjiu.lu@intel.com>
  1363. PR ld/26083
  1364. * elf32-csky.c (csky_elf_size_dynamic_sections): Call
  1365. _bfd_elf_add_dynamic_tags.
  1366. 2020-06-24 H.J. Lu <hongjiu.lu@intel.com>
  1367. PR ld/26083
  1368. * elf32-cris.c (elf_cris_size_dynamic_sections): Call
  1369. _bfd_elf_add_dynamic_tags.
  1370. 2020-06-24 Alan Modra <amodra@gmail.com>
  1371. * vms-alpha.c (_bfd_vms_slurp_etir <ETIR__C_OPR_ASH>): Implement
  1372. shifts without undefined behaviour.
  1373. 2020-06-23 H.J. Lu <hongjiu.lu@intel.com>
  1374. * elf-bfd.h (elf_link_hash_table): Add dt_pltgot_required and
  1375. dt_jmprel_required.
  1376. (_bfd_elf_add_dynamic_tags): New.
  1377. * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Call
  1378. _bfd_elf_add_dynamic_tags.
  1379. * elf32-arc.c (elf_arc_size_dynamic_sections): Likewise.
  1380. * elf32-bfin.c (elf32_bfinfdpic_size_dynamic_sections): Likewise.
  1381. * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
  1382. * elf32-frv.c (elf32_frvfdpic_size_dynamic_sections): Likewise.
  1383. * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
  1384. * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
  1385. * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
  1386. * elf32-microblaze.c (microblaze_elf_size_dynamic_sections):
  1387. Likewise.
  1388. * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
  1389. * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
  1390. * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
  1391. * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
  1392. * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
  1393. * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
  1394. * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
  1395. * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
  1396. * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections):
  1397. Likewise.
  1398. * elfnn-riscv.c (riscv_elf_size_dynamic_sections): Likewise.
  1399. * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
  1400. * elf32-arm.c (elf32_arm_size_dynamic_sections): Call
  1401. _bfd_elf_maybe_vxworks_add_dynamic_tags.
  1402. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
  1403. * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections):
  1404. Likewise.
  1405. * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise.
  1406. (_bfd_x86_elf_size_dynamic_sections): Likewise.
  1407. * elfxx-x86.h (elf_x86_link_hash_table): Remove dt_reloc,
  1408. dt_reloc_sz and dt_reloc_ent.
  1409. * elf-vxworks.c (_bfd_elf_maybe_vxworks_add_dynamic_tags): New.
  1410. * elf-vxworks.h (_bfd_elf_maybe_vxworks_add_dynamic_tags):
  1411. Likewise.
  1412. * elf32-hppa.c (elf32_hppa_link_hash_table_create): Set
  1413. etab.dt_pltgot_required.
  1414. (elf32_hppa_size_dynamic_sections): Call
  1415. _bfd_elf_add_dynamic_tags.
  1416. * elf32-metag.c (elf_metag_link_hash_table_create): Set
  1417. etab.dt_pltgot_required.
  1418. (elf_metag_size_dynamic_sections): Call _bfd_elf_add_dynamic_tags.
  1419. * elf32-sh.c (sh_elf_link_hash_table_create): Set
  1420. root.dt_pltgot_required for FDPIC output.
  1421. (sh_elf_size_dynamic_sections): Call
  1422. _bfd_elf_maybe_vxworks_add_dynamic_tags.
  1423. * elf32-xtensa.c (elf_xtensa_link_hash_table_create): Set
  1424. elf.dt_pltgot_required.
  1425. (elf_xtensa_size_dynamic_sections): Call
  1426. _bfd_elf_add_dynamic_tags.
  1427. * elf64-hppa.c (elf64_hppa_hash_table_create): Set
  1428. root.dt_pltgot_required.
  1429. (elf64_hppa_size_dynamic_sections): Call
  1430. _bfd_elf_add_dynamic_tags.
  1431. * elfnn-ia64.c (elfNN_ia64_hash_table_create): Set
  1432. root.dt_pltgot_required.
  1433. (elfNN_ia64_size_dynamic_sections): Set root.dt_jmprel_required
  1434. for rel_pltoff_sec. Call _bfd_elf_add_dynamic_tags.
  1435. * elflink.c (_bfd_elf_add_dynamic_tags): New.
  1436. 2020-06-22 Saagar Jha <saagar@saagarjha.com>
  1437. * mach-o.c: Support the new load commands by reading a linkedit
  1438. data command for them.
  1439. 2020-06-22 Nelson Chu <nelson.chu@sifive.com>
  1440. * elfxx-riscv.c (struct priv_spec_t priv_specs[]): Move them from
  1441. opcodes/riscv-opc.c to bfd/elfxx-riscv.c, since we need it in linker.
  1442. (riscv_get_priv_spec_class): Likewise.
  1443. (riscv_get_priv_spec_name): Likewise.
  1444. (riscv_get_priv_spec_class_from_numbers): New function, convert
  1445. the version numbers into string, then call riscv_get_priv_spec_class
  1446. to get the priv spec class.
  1447. * elfxx-riscv.h (riscv_get_priv_spec_class): Move forward declaration
  1448. from include/opcode/riscv.h to bfd/elfxx-riscv.h.
  1449. (riscv_get_priv_spec_name): Likewise.
  1450. (riscv_get_priv_spec_class_from_numbers): New forward declaration.
  1451. (opcode/riscv.h): Include it in the header rather than elfxx-riscv.c.
  1452. * elfnn-riscv.c (riscv_merge_attributes): Get the priv spec classes
  1453. of input and output objects form their priv spec attributes by
  1454. riscv_get_priv_spec_class_from_numbers. Report warning rather than
  1455. errors when linking objects with differnet priv spec versions. We do
  1456. know v1.9.1 may have conflicts to other versions, so report the
  1457. warning, too. After that, update the output priv spec version to the
  1458. newest one so far.
  1459. 2020-06-22 Nelson Chu <nelson.chu@sifive.com>
  1460. * elfnn-riscv.c (riscv_merge_attributes): Once we meet one of the
  1461. priv attributes, we will check the conflicts for all of them (major,
  1462. minor and revision), and then set the priv_attrs_merged to TRUE to
  1463. indicate that we have handled all of the priv attributes. Remove
  1464. the unused boolean priv_may_conflict, in_priv_zero and out_priv_zero.
  1465. 2020-06-21 Alan Modra <amodra@gmail.com>
  1466. PR 26132
  1467. * configure.ac: Disable plugins by default for some targets.
  1468. * plugin.c: Comment typo fix.
  1469. * configure: Regenerate.
  1470. 2020-06-19 Nick Clifton <nickc@redhat.com>
  1471. * plugin.c (try_load_plugin): Suppress the error message about
  1472. being unable to open a plugin if creating a list of viable
  1473. plugins.
  1474. 2020-06-16 Alan Modra <amodra@gmail.com>
  1475. * aout-tic30.c: Delete file.
  1476. * Makefile.am (BFD32_BACKENDS): Remove aout-tic30.lo.
  1477. (BFD32_BACKENDS_CFILES): Remove aout-tic30.c.
  1478. * config.bfd (c30-*-*aout*, tic30-*-*aout*): Remove entry.
  1479. (xc16x-*-elf): Sort properly.
  1480. * configure.ac: Remove tic30_aout_vec.
  1481. * targets.c: Likewise.
  1482. * Makefile.in: Regenerate.
  1483. * configure: Regenerate.
  1484. * po/SRC-POTFILES.in: Regenerate.
  1485. 2020-06-15 Max Filippov <jcmvbkbc@gmail.com>
  1486. * elf32-xtensa.c (XSHAL_ABI, XTHAL_ABI_UNDEFINED)
  1487. (XTHAL_ABI_WINDOWED, XTHAL_ABI_CALL0): New macros.
  1488. (elf32xtensa_abi): New global variable.
  1489. (xtensa_abi_choice): New function.
  1490. (elf_xtensa_create_plt_entry): Use xtensa_abi_choice instead of
  1491. XSHAL_ABI to select PLT code.
  1492. 2020-06-15 Roland McGrath <mcgrathr@google.com>
  1493. * elflink.c (bfd_elf_define_start_stop): Use start_stop_visibility
  1494. field of bfd_link_info.
  1495. 2020-06-15 Alan Modra <amodra@gmail.com>
  1496. * config.bfd: Obsolete powerpcle-*-pe targets.
  1497. 2020-06-15 Alan Modra <amodra@gmail.com>
  1498. PR 26103
  1499. * elflink.c (elf_link_add_archive_symbols): Exclude undefined
  1500. symbols that were defined in discarded sections.
  1501. * cofflink.c (coff_link_check_archive_element): Likewise.
  1502. (coff_link_add_symbols): Set indx to -3 for symbols defined in
  1503. discarded sections.
  1504. (_bfd_coff_write_global_sym): Don't emit such symbols.
  1505. libcoff-in.h (struct coff_link_hash_entry): Update indx comment.
  1506. libcoff.h: Regenerate.
  1507. 2020-06-11 Alan Modra <amodra@gmail.com>
  1508. PR 26107
  1509. * pdp11.c (is_stab): Replace legacy "index" function with "strchr".
  1510. 2020-06-10 H.J. Lu <hongjiu.lu@intel.com>
  1511. * elfnn-ia64.c (elfNN_ia64_link_hash_table): Remove reltext.
  1512. (allocate_dynrel_entries): Set DF_TEXTREL instead of reltext.
  1513. (elfNN_ia64_size_dynamic_sections): Check DF_TEXTREL instead
  1514. of reltext.
  1515. 2020-06-10 H.J. Lu <hongjiu.lu@intel.com>
  1516. PR ld/26094
  1517. * elflink.c (bfd_elf_define_start_stop): Handle common symbols.
  1518. Clear verinfo.verdef.
  1519. 2020-06-09 H.J. Lu <hongjiu.lu@intel.com>
  1520. PR ld/18801
  1521. * elf-bfd.h (elf_link_hash_table): Add ifunc_resolvers.
  1522. (_bfd_elf_allocate_ifunc_dyn_relocs): Remove the
  1523. bfd_boolean * argument. Set ifunc_resolvers if there are IFUNC
  1524. resolvers.
  1525. * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated.
  1526. Set ifunc_resolvers if there are FUNC resolvers.
  1527. * elf64-ppc.c (ppc_link_hash_table): Remove local_ifunc_resolver.
  1528. (build_global_entry_stubs_and_plt): Replace local_ifunc_resolver
  1529. with elf.ifunc_resolvers.
  1530. (write_plt_relocs_for_local_syms): Likewise.
  1531. (ppc64_elf_relocate_section): Likewise.
  1532. (ppc64_elf_finish_dynamic_sections): Likewise.
  1533. * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
  1534. Updated.
  1535. * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
  1536. (_bfd_x86_elf_size_dynamic_sections): Check elf.ifunc_resolvers
  1537. instead of readonly_dynrelocs_against_ifunc.
  1538. * elfxx-x86.h (elf_x86_link_hash_table): Remove
  1539. readonly_dynrelocs_against_ifunc.
  1540. 2020-06-09 Alan Modra <amodra@gmail.com>
  1541. * elf64-ppc.c (struct ppc_link_hash_table): Delete
  1542. maybe_local_ifunc_resolver field.
  1543. (build_global_entry_stubs_and_plt): Set local_ifunc_resolver in
  1544. cases where maybe_local_ifunc_resolver was set.
  1545. (ppc64_elf_relocate_section): Likewise.
  1546. (ppc64_elf_finish_dynamic_sections): Downgrade ifunc with textrel
  1547. error to a warning.
  1548. 2020-06-08 H.J. Lu <hongjiu.lu@intel.com>
  1549. * elf-bfd.h (elf_link_hash_entry): Add tlsdesc_plt and
  1550. tlsdesc_got.
  1551. * elf32-arm.c (elf32_arm_link_hash_table): Remove tlsdesc_plt
  1552. and dt_tlsdesc_got.
  1553. (elf32_arm_size_dynamic_sections): Updated. Clear
  1554. root.tlsdesc_plt for DF_BIND_NOW.
  1555. (elf32_arm_finish_dynamic_sections): Updated.
  1556. (elf32_arm_output_arch_local_syms): Likewise.
  1557. * elf32-nds32.c (nds32_elf_size_dynamic_sections): Updated.
  1558. Clear root.tlsdesc_plt for DF_BIND_NOW.
  1559. (nds32_elf_finish_dynamic_sections): Updated.
  1560. * elf32-nds32.h (elf_nds32_link_hash_table): Remove
  1561. dt_tlsdesc_plt and dt_tlsdesc_got.
  1562. * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Updated.
  1563. * elfnn-aarch64.c (elf_aarch64_link_hash_table): Remove
  1564. tlsdesc_plt and dt_tlsdesc_got.
  1565. (elfNN_aarch64_allocate_dynrelocs): Updated.
  1566. (elfNN_aarch64_finish_dynamic_sections): Likewise.
  1567. (elfNN_aarch64_size_dynamic_sections): Updated. Clear
  1568. root.tlsdesc_plt for DF_BIND_NOW. Don't check DF_BIND_NOW
  1569. twice.
  1570. * elfxx-x86.c (elf_x86_allocate_dynrelocs): Updated.
  1571. (_bfd_x86_elf_size_dynamic_sections): Likewise.
  1572. (_bfd_x86_elf_finish_dynamic_sections): Likewise.
  1573. * elfxx-x86.h (elf_x86_link_hash_table): Remove tlsdesc_plt and
  1574. tlsdesc_got.
  1575. 2020-06-07 H.J. Lu <hongjiu.lu@intel.com>
  1576. * elf32-tic6x.c (elf32_bed): Defined the default to
  1577. elf32_tic6x_bed.
  1578. 2020-06-07 H.J. Lu <hongjiu.lu@intel.com>
  1579. * elf64-hppa.c (elf64_hppa_link_hash_table): Remove plt_sec and
  1580. plt_rel_sec.
  1581. (elf64_hppa_check_relocs): Replace plt_sec/plt_rel_sec with
  1582. root.splt/root.srelplt.
  1583. (elf64_hppa_create_dynamic_sections): Likewise.
  1584. (elf64_hppa_size_dynamic_sections): Likewise.
  1585. (elf64_hppa_finish_dynamic_symbol): Likewise.
  1586. (elf_hppa_final_link): Likewise.
  1587. (elf_hppa_final_link_relocate): Likewise.
  1588. 2020-06-06 H.J. Lu <hongjiu.lu@intel.com>
  1589. * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Updated.
  1590. * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Remove
  1591. is_vxworks.
  1592. 2020-06-06 H.J. Lu <hongjiu.lu@intel.com>
  1593. * elf-bfd.h (elf_target_os): New.
  1594. (elf_link_hash_table): Add target_os.
  1595. (elf_backend_data): Add target_os.
  1596. * elf32-arm.c (elf32_arm_link_hash_table): Remove vxworks_p,
  1597. symbian_p and nacl_p.
  1598. (create_got_section): Updated.
  1599. (elf32_arm_create_dynamic_sections): Likewise.
  1600. (arm_type_of_stub): Likewise.
  1601. (elf32_arm_create_or_find_stub_sec): Likewise.
  1602. (elf32_arm_allocate_plt_entry): Likewise.
  1603. (elf32_arm_populate_plt_entry): Likewise.
  1604. (elf32_arm_final_link_relocate): Likewise.
  1605. (elf32_arm_check_relocs): Likewise.
  1606. (allocate_dynrelocs_for_symbol): Likewise.
  1607. (elf32_arm_finish_dynamic_symbol): Likewise.
  1608. (elf32_arm_finish_dynamic_sections): Likewise.
  1609. (elf32_arm_output_plt_map_1): Likewise.
  1610. (elf32_arm_output_arch_local_syms): Likewise.
  1611. (elf32_arm_add_symbol_hook): Likewise.
  1612. (elf32_arm_nacl_link_hash_table_create): Likewise.
  1613. (elf32_arm_vxworks_link_hash_table_create): Likewise.
  1614. (elf32_arm_symbian_link_hash_table_create): Likewise.
  1615. (ELF_TARGET_OS): New.
  1616. * elf32-i386.c (elf_i386_arch_bed): Removed.
  1617. (elf_backend_arch_data): Likewise.
  1618. (elf_i386_solaris_arch_bed): Likewise.
  1619. (elf_i386_nacl_arch_bed): Likewise.
  1620. (elf_i386_vxworks_arch_bed): Likewise.
  1621. (elf_i386_relocate_section): Updated.
  1622. (elf_i386_finish_dynamic_sections): Likewise.
  1623. (elf_i386_get_synthetic_symtab): Likewise.
  1624. (elf_i386_link_setup_gnu_properties): Likewise.
  1625. (ELF_TARGET_OS): New.
  1626. * elf32-mips.c (ELF_TARGET_OS): New.
  1627. * elf32-ppc.c (ppc_elf_link_hash_table): Remove is_vxworks.
  1628. (ppc_elf_create_got): Updated.
  1629. (ppc_elf_create_dynamic_sections): Likewise.
  1630. (ppc_elf_check_relocs): Likewise.
  1631. (ppc_elf_adjust_dynamic_symbol): Likewise.
  1632. (ppc_elf_size_dynamic_sections): Likewise.
  1633. (ppc_elf_relocate_section): Likewise.
  1634. (ppc_elf_finish_dynamic_sections): Likewise.
  1635. (ppc_elf_vxworks_link_hash_table_create): Likewise.
  1636. (ELF_TARGET_OS): New.
  1637. * elf32-sh.c (elf_sh_link_hash_table): Remove vxworks_p.
  1638. (sh_elf_link_hash_table_create): Updated.
  1639. (sh_elf_create_dynamic_sections): Likewise.
  1640. (allocate_dynrelocs): Likewise.
  1641. (sh_elf_size_dynamic_sections): Likewise.
  1642. (sh_elf_relocate_section): Likewise.
  1643. (sh_elf_finish_dynamic_symbol): Likewise.
  1644. (sh_elf_finish_dynamic_sections): Likewise.
  1645. (ELF_TARGET_OS): New.
  1646. * elf32-sparc.c (elf32_sparc_vxworks_link_hash_table_create):
  1647. Removed.
  1648. (bfd_elf32_bfd_link_hash_table_create): Likewise.
  1649. (ELF_TARGET_OS): New.
  1650. * elf64-x86-64.c (elf_x86_64_arch_bed): Removed.
  1651. (elf_x86_64_solaris_arch_bed): Likewise.
  1652. (elf_x86_64_nacl_arch_bed): Likewise.
  1653. (elf_x86_64_finish_dynamic_sections): Updated.
  1654. (elf_x86_64_get_synthetic_symtab): Likewise.
  1655. (elf_x86_64_link_setup_gnu_properties): Likewise.
  1656. (ELF_TARGET_OS): New.
  1657. * elflink.c (_bfd_elf_link_hash_table_init): Initialize
  1658. target_o.
  1659. * elfxx-mips.c (mips_elf_link_hash_table): Remove is_vxworks.
  1660. (MIPS_ELF_REL_DYN_NAME): Updated.
  1661. (ELF_MIPS_GP_OFFSET): Likewise.
  1662. (mips_elf_create_local_got_entry): Likewise.
  1663. (mips_elf_allocate_dynamic_relocations): Likewise.
  1664. (mips_elf_count_got_symbols): Likewise.
  1665. (is_gott_symbol): Likewise.
  1666. (mips_elf_calculate_relocation): Likewise.
  1667. (mips_elf_create_dynamic_relocation): Likewise.
  1668. (_bfd_mips_elf_check_relocs): Likewise.
  1669. (allocate_dynrelocs): Likewise.
  1670. (_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
  1671. (mips_elf_lay_out_got): Likewise.
  1672. (mips_elf_set_plt_sym_value): Likewise.
  1673. (_bfd_mips_elf_size_dynamic_sections): Likewise.
  1674. (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
  1675. (_bfd_mips_elf_finish_dynamic_sections): Likewise.
  1676. (_bfd_mips_elf_final_link): Likewise.
  1677. (_bfd_mips_init_file_header): Likewise.
  1678. * elfxx-sparc.c (_bfd_sparc_elf_create_dynamic_sections):
  1679. Likewise.
  1680. (allocate_dynrelocs): Likewise.
  1681. (_bfd_sparc_elf_size_dynamic_sections): Likewise.
  1682. (_bfd_sparc_elf_relocate_section): Likewise.
  1683. (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
  1684. (sparc_finish_dyn): Likewise.
  1685. (_bfd_sparc_elf_finish_dynamic_sections): Likewise.
  1686. * elfxx-target.h (ELF_TARGET_OS): New.
  1687. (elfNN_bed): Add ELF_TARGET_OS.
  1688. * elfxx-x86.c (elf_x86_allocate_dynrelocs): Updated.
  1689. (_bfd_x86_elf_link_hash_table_create): Likewise.
  1690. (_bfd_x86_elf_size_dynamic_sections): Likewise.
  1691. (_bfd_x86_elf_finish_dynamic_sections): Likewise.
  1692. (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
  1693. (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
  1694. * elfxx-x86.h (elf_x86_target_os): Removed.
  1695. (elf_x86_backend_data): Likewise.
  1696. (get_elf_x86_backend_data): Likewise.
  1697. (elf_x86_link_hash_table): Remove target_os.
  1698. 2020-06-06 Alan Modra <amodra@gmail.com>
  1699. * reloc.c: Rename
  1700. BFD_RELOC_PPC64_GOT_TLSGD34 to BFD_RELOC_PPC64_GOT_TLSGD_PCREL34,
  1701. BFD_RELOC_PPC64_GOT_TLSLD34 to BFD_RELOC_PPC64_GOT_TLSLD_PCREL34,
  1702. BFD_RELOC_PPC64_GOT_TPREL34 to BFD_RELOC_PPC64_GOT_TPREL_PCREL34,
  1703. BFD_RELOC_PPC64_GOT_DTPREL34 to BFD_RELOC_PPC64_GOT_DTPREL_PCREL34.
  1704. * elf64-ppc.c: Update throughout for reloc renaming.
  1705. (ppc64_elf_reloc_name_lookup): Handle old reloc names.
  1706. * libbfd.h: Regenerate.
  1707. * bfd-in2.h: Regenerate.
  1708. 2020-06-05 H.J. Lu <hongjiu.lu@intel.com>
  1709. PR ld/26080
  1710. * elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC
  1711. section.
  1712. 2020-06-05 Nick Clifton <nickc@redhat.com>
  1713. * pdp11.c (aout_link_add_symbols): Fix use before initialisation
  1714. bug.
  1715. 2020-06-05 Nelson Chu <nelson.chu@sifive.com>
  1716. * elfnn-riscv.c (riscv_merge_attributes): Add new boolean
  1717. priv_may_conflict, in_priv_zero and out_priv_zero to decide
  1718. whether the object can be linked according to it's priv
  1719. attributes. The object without any priv spec attributes can
  1720. be linked with others. If the first input object doesn't contain
  1721. any priv attributes, then we need to copy the setting from the
  1722. next input one. Also report more detailed error messages to user.
  1723. 2020-06-04 Stephen Casner <casner@acm.org>
  1724. Extend pdp11-aout symbol table format to accommodate .stab
  1725. symbols and implement correct handling of them.
  1726. * pdp11.c (pdp11_external_nlist): Repurposed e_unused to e_desc.
  1727. (N_STAB, is_stab): Needed new function is_stab to disambiguate
  1728. normal vs. .stab symbol table type values, replacing N_STAB mask.
  1729. (translate_from_native_sym_flags): Determine correct section for
  1730. different .stab types.
  1731. (translate_to_native_sym_flags): Leave .stab types intact.
  1732. (translate_symbol_table): Error if symbol indicates overlay;
  1733. store desc field from .stab symbols.
  1734. (write_syms): Output desc field with symbol.
  1735. (aout_link_check_ar_symbols): Skip .stab symbols.
  1736. (aout_link_add_symbols): Correctly distinguish .stab symbols.
  1737. (aout_link_write_other_symbol): Write 0 for desk and ovly fields.
  1738. (aout_link_write_symbols): Write 0 for desk and ovly fields;
  1739. correctly distinguish .stab symbols and select calculate their
  1740. section and value; and copy desc and ovly fields from input symbol
  1741. to output symbol.
  1742. 2020-06-04 Stephen Casner <casner@acm.org>
  1743. * aoutx.h (translate_symbol_table): Comment had external and
  1744. internal swapped.
  1745. * pdp11.c (translate_symbol_table): Likewise.
  1746. 2020-06-04 H.J. Lu <hongjiu.lu@intel.com>
  1747. * elfxx-x86.h (elf_x86_link_hash_table): Remove target_id.
  1748. (is_x86_elf): Check elf.hash_table_id instead of target_id.
  1749. * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Updated.
  1750. 2020-06-04 H.J. Lu <hongjiu.lu@intel.com>
  1751. PR ld/26080
  1752. * elf-m10300.c (mn10300_elf_relocate_section): Resolve relocation
  1753. in debug section against symbol defined in shared library to 0.
  1754. * elf32-i386.c (elf_i386_check_relocs): Remove SEC_ALLOC check.
  1755. * elf32-lm32.c (lm32_elf_check_relocs): Likewise.
  1756. * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
  1757. * elf32-nds32.c (nds32_elf_check_relocs): Likewise.
  1758. * elf32-nios2.c (nios2_elf32_check_relocs): Likewise.
  1759. * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
  1760. * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
  1761. * elf32-sh.c (sh_elf_check_relocs): Likewise.
  1762. * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
  1763. * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
  1764. * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
  1765. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
  1766. * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
  1767. * elf32-vax.c (elf_vax_check_relocs): Set non_got_ref for non-GOT
  1768. reference.
  1769. (elf_vax_adjust_dynamic_symbol): Generate a copy reloc only if
  1770. there is non-GOT reference.
  1771. * elflink.c (_bfd_elf_link_check_relocs): Skip non-loaded,
  1772. non-alloced sections.
  1773. 2020-06-03 Stephen Casner <casner@acm.org>
  1774. Copy several years of fixes from bfd/aoutx.h to bfd/pdp11.c.
  1775. * pdp11.c (some_aout_object_p): 4c1534c7a2a - Don't set EXEC_P for
  1776. files with relocs.
  1777. (aout_get_external_symbols): 6b8f0fd579d - Return if count is zero.
  1778. 0301ce1486b PR 22306 - Handle stringsize of zero, and error for any
  1779. other size that doesn't qcover the header word.
  1780. bf82069dce1 PR 23056 - Allocate an extra byte at the end of the
  1781. string table, and zero it.
  1782. (translate_symbol_table): 0d329c0a83a PR 22887 - Print an error
  1783. message and set bfd_error on finding an invalid name string offset.
  1784. (add_to_stringtab): INLINE -> inline
  1785. (pdp11_aout_swap_reloc_in): 116acb2c268 PR 22887 - Correct r_index
  1786. bound check.
  1787. (squirt_out_relocs): e2996cc315d PR 20921 - Check for and report
  1788. any relocs that could not be recognised.
  1789. 92744f05809 PR 20929 - Check for relocs without an associated symbol.
  1790. (find_nearest_line): 808346fcfcf PR 23055 - Check that the symbol
  1791. name exists and is long enough, before attempting to see if it is
  1792. for a .o file.
  1793. c3864421222 - Correct case for N_SO being the last symbol.
  1794. 50455f1ab29 PR 20891 - Handle the case where the main file name
  1795. and the directory name are both empty.
  1796. e82ab856bb4 PR 20892 - Handle the case where function name is empty.
  1797. (aout_link_add_symbols): e517df3dbf7 PR 19629 - Check for out of
  1798. range string table offsets.
  1799. 531336e3a0b PR 20909 - Fix off-by-one error in check for an
  1800. illegal string offset.
  1801. (aout_link_includes_newfunc): Add comment.
  1802. (pdp11_aout_link_input_section): ad756e3f9e6 - Return with an error
  1803. on unexpected relocation type rather than ASSERT.
  1804. 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
  1805. PR ld/26066
  1806. * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Call
  1807. _bfd_elf_maybe_set_textrel to set DF_TEXTREL.
  1808. 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
  1809. PR ld/26066
  1810. * elf32-nios2.c (nios2_elf32_check_relocs): Skip non-loaded,
  1811. non-alloced sections.
  1812. 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
  1813. * elf32-frv.c (elf32_frv_relocate_section): Don't generate
  1814. dynamic relocations for non SEC_ALLOC sections.
  1815. 2020-06-03 Gunther Nikl <gnikl@justmail.de>
  1816. * aout64.c (BMAGIC, QMAGIC): Do not define.
  1817. * aoutx.h (N_IS_BMAGIC, N_SET_QMAGIC): New defines.
  1818. (NAME (aout, some_aout_object_p)): Use N_IS_QMAGIC and N_IS_BMAGIC
  1819. to check the file format.
  1820. (adjust_z_magic): Use N_SET_QMAGIC to set file format.
  1821. * i386aout.c (NO_WRITE_HEADER_KLUDGE): Delete define.
  1822. * libaout.h (NO_WRITE_HEADER_KLUDGE): Do not define.
  1823. 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
  1824. * elf32-arc.c (elf_arc_relocate_section): Don't generate dynamic
  1825. relocations for non SEC_ALLOC sections.
  1826. 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
  1827. * elf-bfd.h (_bfd_elf_maybe_set_textrel): New
  1828. * elf32-arm.c (maybe_set_textrel): Removed.
  1829. (elf32_arm_size_dynamic_sections): Replace maybe_set_textrel
  1830. with _bfd_elf_maybe_set_textrel.
  1831. * elf32-csky.c (maybe_set_textrel): Removed.
  1832. (csky_elf_size_dynamic_sections): Replace maybe_set_textrel
  1833. with _bfd_elf_maybe_set_textrel.
  1834. * elf32-hppa.c (maybe_set_textrel): Removed.
  1835. (elf32_hppa_size_dynamic_sections): Replace maybe_set_textrel
  1836. with _bfd_elf_maybe_set_textrel.
  1837. * elf32-lm32.c (maybe_set_textrel): Removed.
  1838. (lm32_elf_size_dynamic_sections): Replace maybe_set_textrel
  1839. with _bfd_elf_maybe_set_textrel.
  1840. * elf32-m32r.c (maybe_set_textrel): Removed.
  1841. (m32r_elf_size_dynamic_sections): Replace maybe_set_textrel
  1842. with _bfd_elf_maybe_set_textrel.
  1843. * elf32-metag.c (maybe_set_textrel): Removed.
  1844. (elf_metag_size_dynamic_sections): Replace maybe_set_textrel
  1845. with _bfd_elf_maybe_set_textrel.
  1846. * elf32-nds32.c (maybe_set_textrel): Removed.
  1847. (nds32_elf_size_dynamic_sections): Replace maybe_set_textrel
  1848. with _bfd_elf_maybe_set_textrel.
  1849. * elf32-or1k.c (maybe_set_textrel): Removed.
  1850. (or1k_elf_size_dynamic_sections): Replace maybe_set_textrel
  1851. with _bfd_elf_maybe_set_textrel.
  1852. * elf32-ppc.c (maybe_set_textrel): Removed.
  1853. (ppc_elf_size_dynamic_sections): Replace maybe_set_textrel
  1854. with _bfd_elf_maybe_set_textrel.
  1855. * elf32-s390.c (maybe_set_textrel): Removed.
  1856. (elf_s390_size_dynamic_sections): Replace maybe_set_textrel
  1857. with _bfd_elf_maybe_set_textrel.
  1858. * elf32-sh.c (maybe_set_textrel): Removed.
  1859. (sh_elf_size_dynamic_sections): Replace maybe_set_textrel
  1860. with _bfd_elf_maybe_set_textrel.
  1861. * elf32-tic6x.c (maybe_set_textrel): Removed.
  1862. (elf32_tic6x_size_dynamic_sections): Replace maybe_set_textrel
  1863. with _bfd_elf_maybe_set_textrel.
  1864. * elf32-tilepro.c (maybe_set_textrel): Removed.
  1865. (tilepro_elf_size_dynamic_sections): Replace maybe_set_textrel
  1866. with _bfd_elf_maybe_set_textrel.
  1867. * elf64-ppc.c (maybe_set_textrel): Removed.
  1868. (ppc64_elf_size_dynamic_sections): Replace maybe_set_textrel
  1869. with _bfd_elf_maybe_set_textrel.
  1870. * elf64-s390.c (maybe_set_textrel): Removed.
  1871. (elf_s390_size_dynamic_sections): Replace maybe_set_textrel
  1872. with _bfd_elf_maybe_set_textrel.
  1873. * elfnn-aarch64.c (maybe_set_textrel): Removed.
  1874. (elfNN_aarch64_size_dynamic_sections): Replace maybe_set_textrel
  1875. with _bfd_elf_maybe_set_textrel.
  1876. * elfnn-riscv.c (maybe_set_textrel): Removed.
  1877. (riscv_elf_size_dynamic_sections): Replace maybe_set_textrel
  1878. with _bfd_elf_maybe_set_textrel.
  1879. * elfxx-sparc.c (maybe_set_textrel): Removed.
  1880. (_bfd_sparc_elf_size_dynamic_sections): Replace maybe_set_textrel
  1881. with _bfd_elf_maybe_set_textrel.
  1882. * elfxx-tilegx.c (maybe_set_textrel): Removed.
  1883. (tilegx_elf_size_dynamic_sections): Replace maybe_set_textrel
  1884. with _bfd_elf_maybe_set_textrel.
  1885. * elfxx-x86.c (maybe_set_textrel): Removed.
  1886. (_bfd_x86_elf_size_dynamic_sections): Replace maybe_set_textrel
  1887. with _bfd_elf_maybe_set_textrel.
  1888. * elflink.c (_bfd_elf_maybe_set_textrel): New.
  1889. 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
  1890. PR ld/26067
  1891. * elf32-arm.c (elf32_arm_copy_indirect_symbol): Don't copy
  1892. dyn_relocs.
  1893. * elf32-csky.c (csky_elf_copy_indirect_symbol): Likewise.
  1894. * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
  1895. * elf32-metag.c (elf_metag_copy_indirect_symbol): Likewise.
  1896. * elf32-microblaze.c (microblaze_elf_copy_indirect_symbol):
  1897. Likewise.
  1898. * elf32-nds32.c (nds32_elf_copy_indirect_symbol): Likewise.
  1899. * elf32-nios2.c (nios2_elf32_copy_indirect_symbol): Likewise.
  1900. * elf32-or1k.c (or1k_elf_copy_indirect_symbol): Likewise.
  1901. * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
  1902. * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
  1903. * elf32-tilepro.c (tilepro_elf_copy_indirect_symbol): Likewise.
  1904. * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
  1905. * elfnn-aarch64.c (elfNN_aarch64_copy_indirect_symbol): Likewise.
  1906. * elfnn-riscv.c (riscv_elf_copy_indirect_symbol): Likewise.
  1907. * elfxx-sparc.c (_bfd_sparc_elf_copy_indirect_symbol): Likewise.
  1908. * elfxx-tilegx.c (tilegx_elf_copy_indirect_symbol): Likewise.
  1909. * elfxx-x86.c (_bfd_x86_elf_copy_indirect_symbol): Likewise.
  1910. * elf32-lm32.c (lm32_elf_copy_indirect_symbol): Removed.
  1911. (elf_backend_copy_indirect_symbol): Likewise.
  1912. * elf32-m32r.c (m32r_elf_copy_indirect_symbol): Removed.
  1913. (elf_backend_copy_indirect_symbol): Likewise.
  1914. * elflink.c (_bfd_elf_link_hash_copy_indirect): Copy dyn_relocs.
  1915. 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
  1916. PR ld/26067
  1917. * elf-bfd.h (_bfd_elf_readonly_dynrelocs): New.
  1918. * elf32-arm.c (readonly_dynrelocs): Removed.
  1919. (maybe_set_textrel): Replace readonly_dynrelocs with
  1920. _bfd_elf_readonly_dynrelocs.
  1921. * elf32-csky.c (readonly_dynrelocs): Removed.
  1922. (maybe_set_textrel): Replace readonly_dynrelocs with
  1923. _bfd_elf_readonly_dynrelocs.
  1924. * elf32-hppa.c(readonly_dynrelocs): Removed.
  1925. (alias_readonly_dynrelocs): Replace readonly_dynrelocs with
  1926. _bfd_elf_readonly_dynrelocs.
  1927. (maybe_set_textrel): Likewise.
  1928. * elf32-lm32.c (readonly_dynrelocs): Removed.
  1929. (lm32_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
  1930. with _bfd_elf_readonly_dynrelocs.
  1931. (maybe_set_textrel): Likewise.
  1932. * elf32-m32r.c (readonly_dynrelocs): Removed.
  1933. (m32r_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
  1934. with _bfd_elf_readonly_dynrelocs.
  1935. (maybe_set_textrel): Likewise.
  1936. * elf32-metag.c (readonly_dynrelocs): Removed.
  1937. (elf_metag_adjust_dynamic_symbol): Replace readonly_dynrelocs
  1938. with _bfd_elf_readonly_dynrelocs.
  1939. (maybe_set_textrel): Likewise.
  1940. * elf32-microblaze.c (readonly_dynrelocs): Removed.
  1941. (microblaze_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
  1942. with _bfd_elf_readonly_dynrelocs.
  1943. * elf32-nds32.c (readonly_dynrelocs): Removed.
  1944. (nds32_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
  1945. with _bfd_elf_readonly_dynrelocs.
  1946. (maybe_set_textrel): Likewise.
  1947. * elf32-or1k.c (readonly_dynrelocs): Removed.
  1948. (or1k_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
  1949. with _bfd_elf_readonly_dynrelocs.
  1950. * elf32-ppc.c (readonly_dynrelocs): Removed.
  1951. (alias_readonly_dynrelocs): Replace readonly_dynrelocs with
  1952. _bfd_elf_readonly_dynrelocs.
  1953. (ppc_elf_adjust_dynamic_symbol): Likewise.
  1954. (maybe_set_textrel): Likewise.
  1955. * elf32-s390.c (readonly_dynrelocs): Removed.
  1956. (elf_s390_adjust_dynamic_symbol): Replace readonly_dynrelocs
  1957. with _bfd_elf_readonly_dynrelocs.
  1958. (maybe_set_textrel): Likewise.
  1959. * elf32-sh.c (readonly_dynrelocs): Removed.
  1960. (sh_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs with
  1961. _bfd_elf_readonly_dynrelocs.
  1962. (maybe_set_textrel): Likewise.
  1963. * elf32-tic6x.c (readonly_dynrelocs): Removed.
  1964. (maybe_set_textrel): Replace readonly_dynrelocs with
  1965. _bfd_elf_readonly_dynrelocs.
  1966. * elf32-tilepro.c (readonly_dynrelocs): Removed.
  1967. (tilepro_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
  1968. with _bfd_elf_readonly_dynrelocs.
  1969. (maybe_set_textrel): Likewise.
  1970. * elf64-ppc.c (readonly_dynrelocs): Removed.
  1971. (alias_readonly_dynrelocs): Replace readonly_dynrelocs with
  1972. _bfd_elf_readonly_dynrelocs.
  1973. (ppc64_elf_adjust_dynamic_symbol): Likewise.
  1974. (maybe_set_textrel): Likewise.
  1975. * elf64-s390.c (readonly_dynrelocs): Removed.
  1976. (elf_s390_adjust_dynamic_symbol): Replace readonly_dynrelocs
  1977. with _bfd_elf_readonly_dynrelocs.
  1978. (maybe_set_textrel): Likewise.
  1979. * elflink.c (_bfd_elf_readonly_dynrelocs): New.
  1980. * elfnn-aarch64.c (readonly_dynrelocs): Removed.
  1981. (maybe_set_textrel): Replace readonly_dynrelocs with
  1982. _bfd_elf_readonly_dynrelocs.
  1983. * elfnn-riscv.c (readonly_dynrelocs): Removed.
  1984. (riscv_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
  1985. with _bfd_elf_readonly_dynrelocs.
  1986. (maybe_set_textrel): Likewise.
  1987. * elfxx-sparc.c (readonly_dynrelocs): Removed.
  1988. (_bfd_sparc_elf_adjust_dynamic_symbol): Replace
  1989. readonly_dynrelocs with _bfd_elf_readonly_dynrelocs.
  1990. (maybe_set_textrel): Likewise.
  1991. * elfxx-tilegx.c (readonly_dynrelocs): Removed.
  1992. (tilegx_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
  1993. with _bfd_elf_readonly_dynrelocs.
  1994. (maybe_set_textrel): Likewise.
  1995. * elfxx-x86.c (readonly_dynrelocs): Removed.
  1996. (maybe_set_textrel): Replace readonly_dynrelocs with
  1997. _bfd_elf_readonly_dynrelocs.
  1998. (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
  1999. 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
  2000. * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Silence
  2001. -fsanitize=undefined.
  2002. 2020-06-03 Alan Modra <amodra@gmail.com>
  2003. PR 26069
  2004. PR 18758
  2005. * peicode.h (pe_ILF_make_a_section): Align data for compilers
  2006. other than gcc.
  2007. (pe_ILF_build_a_bfd): Likewise.
  2008. 2020-06-03 Alan Modra <amodra@gmail.com>
  2009. PR 26069
  2010. * elf.c (_bfd_elf_close_and_cleanup): Free elf_shstrtab for
  2011. core files as well as objects.
  2012. 2020-06-01 H.J. Lu <hongjiu.lu@intel.com>
  2013. PR ld/26067
  2014. * elf-bfd.h (elf_link_hash_entry): Add dyn_relocs after size.
  2015. * elf-s390-common.c (s390_elf_allocate_ifunc_dyn_relocs):
  2016. Updated.
  2017. * elf32-arc.c (elf_arc_link_hash_entry): Remove dyn_relocs.
  2018. (elf_arc_link_hash_newfunc): Updated.
  2019. * elf32-arm.c (elf32_arm_link_hash_entry): Remove dyn_relocs.
  2020. (elf32_arm_link_hash_newfunc): Updated.
  2021. (elf32_arm_copy_indirect_symbol): Likewise.
  2022. (elf32_arm_check_relocs): Likewise.
  2023. (readonly_dynrelocs): Likewise.
  2024. (allocate_dynrelocs_for_symbol): Likewise.
  2025. * elf32-csky.c (csky_elf_link_hash_entry): Remove dyn_relocs.
  2026. (csky_elf_link_hash_newfunc): Updated.
  2027. (csky_allocate_dynrelocs): Likewise.
  2028. (readonly_dynrelocs): Likewise.
  2029. (csky_elf_copy_indirect_symbol): Likewise.
  2030. * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove dyn_relocs.
  2031. (hppa_link_hash_newfunc): Updated.
  2032. (elf32_hppa_copy_indirect_symbol): Likewise.
  2033. (elf32_hppa_hide_symbol): Likewise.
  2034. (elf32_hppa_adjust_dynamic_symbol): Likewise.
  2035. (allocate_dynrelocs): Likewise.
  2036. (elf32_hppa_relocate_section): Likewise.
  2037. * elf32-i386.c (elf_i386_check_relocs): Likewise.
  2038. * elf32-lm32.c (elf_lm32_link_hash_entry): Removed.
  2039. (lm32_elf_link_hash_newfunc): Likewise.
  2040. (lm32_elf_link_hash_table_create): Updated.
  2041. (readonly_dynrelocs): Likewise.
  2042. (allocate_dynrelocs): Likewise.
  2043. (lm32_elf_copy_indirect_symbol): Likewise.
  2044. * elf32-m32r.c (elf_m32r_link_hash_entry): Removed.
  2045. (m32r_elf_link_hash_newfunc): Likewise.
  2046. (m32r_elf_link_hash_table_create): Updated.
  2047. (m32r_elf_copy_indirect_symbol): Likewise.
  2048. (allocate_dynrelocs): Likewise.
  2049. * elf32-metag.c (elf_metag_link_hash_entry): Remove dyn_relocs.
  2050. (metag_link_hash_newfunc): Updated.
  2051. (elf_metag_copy_indirect_symbol): Likewise.
  2052. (readonly_dynrelocs): Likewise.
  2053. (allocate_dynrelocs): Likewise.
  2054. * elf32-microblaze.c (elf32_mb_link_hash_entry): Remove
  2055. dyn_relocs.
  2056. (link_hash_newfunc): Updated.
  2057. (microblaze_elf_check_relocs): Likewise.
  2058. (microblaze_elf_copy_indirect_symbol): Likewise.
  2059. (readonly_dynrelocs): Likewise.
  2060. (allocate_dynrelocs): Likewise.
  2061. * elf32-nds32.c (elf_nds32_link_hash_entry): Remove dyn_relocs.
  2062. (nds32_elf_link_hash_newfunc): Updated.
  2063. (nds32_elf_copy_indirect_symbol): Likewise.
  2064. (readonly_dynrelocs): Likewise.
  2065. (allocate_dynrelocs): Likewise.
  2066. (nds32_elf_check_relocs): Likewise.
  2067. * elf32-nios2.c (elf32_nios2_link_hash_entry): Remove dyn_relocs.
  2068. (link_hash_newfunc): Updated.
  2069. (nios2_elf32_copy_indirect_symbol): Likewise.
  2070. (nios2_elf32_check_relocs): Likewise.
  2071. (allocate_dynrelocs): Likewise.
  2072. * elf32-or1k.c (elf_or1k_link_hash_entry): Remove dyn_relocs.
  2073. (or1k_elf_link_hash_newfunc): Updated.
  2074. (readonly_dynrelocs): Likewise.
  2075. (allocate_dynrelocs): Likewise.
  2076. (or1k_elf_copy_indirect_symbol): Likewise.
  2077. * elf32-ppc.c (ppc_elf_link_hash_entry): Remove dyn_relocs.
  2078. (ppc_elf_link_hash_newfunc): Updated.
  2079. (ppc_elf_copy_indirect_symbol): Likewise.
  2080. (ppc_elf_check_relocs): Likewise.
  2081. (readonly_dynrelocs): Likewise.
  2082. (ppc_elf_adjust_dynamic_symbol): Likewise.
  2083. (allocate_dynrelocs): Likewise.
  2084. (ppc_elf_relocate_section): Likewise.
  2085. * elf32-s390.c (elf_s390_link_hash_entry): Remove dyn_relocs.
  2086. (link_hash_newfunc): Updated.
  2087. (elf_s390_copy_indirect_symbol): Likewise.
  2088. (readonly_dynrelocs): Likewise.
  2089. (elf_s390_adjust_dynamic_symbol): Likewise.
  2090. (allocate_dynrelocs): Likewise.
  2091. * elf32-sh.c (elf_sh_link_hash_entry): Remove dyn_relocs.
  2092. (sh_elf_link_hash_newfunc): Updated.
  2093. (readonly_dynrelocs): Likewise.
  2094. (allocate_dynrelocs): Likewise.
  2095. (sh_elf_copy_indirect_symbol): Likewise.
  2096. (sh_elf_check_relocs): Likewise.
  2097. * elf32-tic6x.c (elf32_tic6x_link_hash_entry): Removed.
  2098. (elf32_tic6x_link_hash_newfunc): Likewise.
  2099. (elf32_tic6x_link_hash_table_create): Updated.
  2100. (readonly_dynrelocs): Likewise.
  2101. (elf32_tic6x_check_relocs): Likewise.
  2102. (elf32_tic6x_allocate_dynrelocs): Likewise.
  2103. * elf32-tilepro.c (tilepro_elf_link_hash_entry): Remove
  2104. dyn_relocs.
  2105. (link_hash_newfunc): Updated.
  2106. (tilepro_elf_copy_indirect_symbol): Likewise.
  2107. (tilepro_elf_check_relocs): Likewise.
  2108. (allocate_dynrelocs): Likewise.
  2109. * elf64-ppc.c (ppc_link_hash_entry): Remove dyn_relocs.
  2110. (ppc64_elf_copy_indirect_symbol): Updated.
  2111. (ppc64_elf_check_relocs): Likewise.
  2112. (readonly_dynrelocs): Likewise.
  2113. (ppc64_elf_adjust_dynamic_symbol): Likewise.
  2114. (dec_dynrel_count): Likewise.
  2115. (allocate_dynrelocs): Likewise.
  2116. (ppc64_elf_relocate_section): Likewise.
  2117. * elf64-s390.c (elf_s390_link_hash_entry): Remove dyn_relocs.
  2118. (link_hash_newfunc): Updated.
  2119. (elf_s390_copy_indirect_symbol): Likewise.
  2120. (readonly_dynrelocs): Likewise.
  2121. (allocate_dynrelocs): Likewise.
  2122. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
  2123. * elfnn-aarch64.c (elf_aarch64_link_hash_entry): Remove
  2124. dyn_relocs.
  2125. (elfNN_aarch64_link_hash_newfunc): Updated.
  2126. (elfNN_aarch64_copy_indirect_symbol): Likewise.
  2127. (readonly_dynrelocs): Likewise.
  2128. (need_copy_relocation_p): Likewise.
  2129. (elfNN_aarch64_allocate_dynrelocs): Likewise.
  2130. (elfNN_aarch64_allocate_ifunc_dynrelocs): Likewise.
  2131. * elfnn-riscv.c (riscv_elf_link_hash_entry): Remove dyn_relocs.
  2132. (link_hash_newfunc): Updated.
  2133. (riscv_elf_copy_indirect_symbol): Likewise.
  2134. (riscv_elf_check_relocs): Likewise.
  2135. (readonly_dynrelocs): Likewise.
  2136. (allocate_dynrelocs): Likewise.
  2137. * elfxx-sparc.c (_bfd_sparc_elf_link_hash_entry): Remove
  2138. dyn_relocs.
  2139. (link_hash_newfunc): Updated.
  2140. (_bfd_sparc_elf_copy_indirect_symbol): Likewise.
  2141. (_bfd_sparc_elf_check_relocs): Likewise.
  2142. (readonly_dynrelocs): Likewise.
  2143. (allocate_dynrelocs): Likewise.
  2144. * elfxx-tilegx.c (tilegx_elf_link_hash_entry): Remove dyn_relocs.
  2145. (link_hash_newfunc): Updated.
  2146. (tilegx_elf_copy_indirect_symbol): Likewise.
  2147. (tilegx_elf_check_relocs): Likewise.
  2148. (readonly_dynrelocs): Likewise.
  2149. (allocate_dynrelocs): Likewise.
  2150. * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
  2151. (readonly_dynrelocs): Likewise.
  2152. (_bfd_x86_elf_copy_indirect_symbol): Likewise.
  2153. * elfxx-x86.h (elf_x86_link_hash_entry): Remove dyn_relocs.
  2154. 2020-06-01 Alan Modra <amodra@gmail.com>
  2155. * vms-alpha.c (_bfd_vms_slurp_etir): Check bound for the current
  2156. command against cmd_length, not the end of record. For
  2157. ETIR__C_STO_IMMR check size against cmd_length, mask repeat count
  2158. to 32-bits and break out on zero size. Add ETIR__C_STC_LP_PSB
  2159. cmd_length test.
  2160. 2020-05-28 David Faust <david.faust@oracle.com>
  2161. * elf64-bpf.c (bpf_elf_relocate_section): Fix handling of
  2162. R_BPF_INSN_{32,64} relocations.
  2163. 2020-05-28 Stephen Casner <casner@acm.org>
  2164. * pdp11.c: Implement BRD_RELOC_32 to relocate the low 16 bits of
  2165. addreses in .long (used in testsuites) and .stab values.
  2166. 2020-05-27 H.J. Lu <hongjiu.lu@intel.com>
  2167. PR ld/22909
  2168. * elflink.c (bfd_elf_final_link): Use bfd_link_textrel_check.
  2169. Check bfd_link_dll when issue a DT_TEXTREL warning.
  2170. * elfxx-x86.c (maybe_set_textrel): Likewise.
  2171. (_bfd_x86_elf_size_dynamic_sections): Likewise.
  2172. 2020-05-26 Nick Clifton <nickc@redhat.com>
  2173. * plugin.c (try_load_plugin): Extend error message when a plugin
  2174. fails to open.
  2175. 2020-05-23 Alan Modra <amodra@gmail.com>
  2176. * bfdio.c (bfd_get_file_size): Don't segfault on NULL arch_header.
  2177. 2020-05-22 Alan Modra <amodra@gmail.com>
  2178. PR 25882
  2179. * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Don't init FP
  2180. attributes from shared libraries, and do not return an error if
  2181. they don't match.
  2182. 2020-05-21 Alan Modra <amodra@gmail.com>
  2183. PR 25993
  2184. * opncls.c (_bfd_free_cached_info): Keep a copy of the bfd
  2185. filename.
  2186. (_bfd_delete_bfd): Free the copy.
  2187. (_bfd_new_bfd): Free nbfd->memory on error.
  2188. 2020-05-21 Alan Modra <amodra@gmail.com>
  2189. * aoutx.h: Replace "if (x) free (x)" with "free (x)" throughout.
  2190. * archive.c, * bfd.c, * bfdio.c, * coff-alpha.c, * coff-ppc.c,
  2191. * coff-sh.c, * coff-stgo32.c, * coffcode.h, * coffgen.c,
  2192. * cofflink.c, * cpu-arm.c, * doc/chew.c, * dwarf2.c, * ecoff.c,
  2193. * ecofflink.c, * elf-eh-frame.c, * elf-m10200.c, * elf-m10300.c,
  2194. * elf-strtab.c, * elf.c, * elf32-arc.c, * elf32-arm.c,
  2195. * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-crx.c,
  2196. * elf32-epiphany.c, * elf32-ft32.c, * elf32-h8300.c,
  2197. * elf32-ip2k.c, * elf32-m32c.c, * elf32-m68hc11.c,
  2198. * elf32-m68k.c, * elf32-microblaze.c, * elf32-msp430.c,
  2199. * elf32-nds32.c, * elf32-nios2.c, * elf32-ppc.c, * elf32-pru.c,
  2200. * elf32-rl78.c, * elf32-rx.c, * elf32-sh.c, * elf32-spu.c,
  2201. * elf32-v850.c, * elf32-xtensa.c, * elf64-alpha.c,
  2202. * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c
  2203. * elf64-mmix.c, * elf64-ppc.c, * elf64-sparc.c, * elfcode.h,
  2204. * elflink.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c,
  2205. * elfxx-x86.c, * format.c, * ihex.c, * libbfd.c, * linker.c,
  2206. * mmo.c, * opncls.c, * pdp11.c, * peXXigen.c, * pef.c,
  2207. * peicode.h, * simple.c, * som.c, * srec.c, * stabs.c, * syms.c,
  2208. * targets.c, * vms-lib.c, * xcofflink.c, * xtensa-isa.c: Likewise.
  2209. 2020-05-20 Nelson Chu <nelson.chu@sifive.com>
  2210. * elfxx-riscv.h (riscv_parse_subset_t): Add new callback function
  2211. get_default_version. It is used to find the default version for
  2212. the specific extension.
  2213. * elfxx-riscv.c (riscv_parsing_subset_version): Remove the parameters
  2214. default_major_version and default_minor_version. Add new bfd_boolean
  2215. parameter *use_default_version. Set it to TRUE if we need to call
  2216. the callback rps->get_default_version to find the default version.
  2217. (riscv_parse_std_ext): Call rps->get_default_version if we fail to find
  2218. the default version in riscv_parsing_subset_version, and then call
  2219. riscv_add_subset to add the subset into subset list.
  2220. (riscv_parse_prefixed_ext): Likewise.
  2221. (riscv_std_z_ext_strtab): Support Zicsr extensions.
  2222. * elfnn-riscv.c (riscv_merge_std_ext): Use strcasecmp to compare the
  2223. strings rather than characters.
  2224. riscv_merge_arch_attr_info): The callback function get_default_version
  2225. is only needed for assembler, so set it to NULL int the linker.
  2226. * elfxx-riscv.c (riscv_estimate_digit): Remove the static.
  2227. * elfxx-riscv.h: Updated.
  2228. 2020-05-20 Alan Modra <amodra@gmail.com>
  2229. PR 25993
  2230. * archive.c (_bfd_get_elt_at_filepos): Don't strdup filename,
  2231. use bfd_set_filename.
  2232. * elfcode.h (_bfd_elf_bfd_from_remote_memory): Likewise.
  2233. * mach-o.c (bfd_mach_o_fat_member_init): Likewise.
  2234. * opncls.c (bfd_fopen, bfd_openstreamr, bfd_openr_iovec, bfd_openw),
  2235. (bfd_create): Likewise.
  2236. (_bfd_delete_bfd): Don't free filename.
  2237. (bfd_set_filename): Copy filename param to bfd_alloc'd memory,
  2238. return pointer to the copy or NULL on alloc fail.
  2239. * vms-lib.c (_bfd_vms_lib_get_module): Free newname and test
  2240. result of bfd_set_filename.
  2241. * bfd-in2.h: Regenerate.
  2242. 2020-05-20 Alan Modra <amodra@gmail.com>
  2243. PR 26011
  2244. * elf.c (_bfd_elf_get_reloc_upper_bound): Sanity check reloc
  2245. section size against file size.
  2246. (_bfd_elf_get_dynamic_reloc_upper_bound): Likewise.
  2247. 2020-05-19 Gunther Nikl <gnikl@justmail.de>
  2248. PR 26005
  2249. * elf.c (bfd_section_from_shdr): Replace bfd_zmalloc with bfd_malloc
  2250. and memset when allocating memory for the sections_being_created
  2251. array.
  2252. 2020-05-19 Stafford Horne <shorne@gmail.com>
  2253. * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Rename srela
  2254. to relgot.
  2255. (or1k_elf_relocate_section): Access srelgot via
  2256. htab->root.srelgot. Add assertions for srelgot->contents.
  2257. Introduce local variable for srelgot to not reuse global
  2258. sreloc.
  2259. (or1k_elf_relocate_section): Fixup dynamic symbol detection.
  2260. (or1k_set_got_and_rela_sizes): New function.
  2261. (or1k_initial_exec_offset): New function.
  2262. (TLS_GD, TLS_IE, TLS_LD, TLS_LE): Redefine macros as masks.
  2263. (or1k_elf_relocate_section): Allow for TLS to handle multiple
  2264. model access.
  2265. (or1k_elf_check_relocs): Use OR to set TLS access.
  2266. (allocate_dynrelocs): Use or1k_set_got_and_rela_sizes to set
  2267. sizes.
  2268. (or1k_elf_size_dynamic_sections): Use
  2269. or1k_set_got_and_rela_sizes to set sizes.
  2270. (or1k_elf_relocate_section): Fixup PCREL relocation calculation.
  2271. (TCB_SIZE): New macro.
  2272. (tpoff): Use TCB_SIZE and alignment to calculate offset.
  2273. (allocate_dynrelocs, readonly_dynrelocs, or1k_elf_check_relocs)
  2274. (or1k_elf_size_dynamic_sections): Rename p to sec_relocs.
  2275. (allocate_dynrelocs): Rename s to splt or sgot based on usage.
  2276. (tpoff): Add dynamic boolean argument.
  2277. (or1k_elf_relocate_section): Pass dynamic flag to tpoff.
  2278. 2020-05-19 Siddhesh Poyarekar <siddesh.poyarekar@arm.com>
  2279. * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Club
  2280. BFD_RELOC_AARCH64_BRANCH19 and BFD_RELOC_AARCH64_TSTBR14
  2281. cases with BFD_RELOC_AARCH64_JUMP26.
  2282. (elfNN_aarch64_check_relocs): Likewise.
  2283. 2020-05-19 Alan Modra <amodra@gmail.com>
  2284. * aix5ppc-core.c (xcoff64_core_file_matches_executable_p): Use
  2285. bfd_get_filename rather than accessing bfd->filename directly.
  2286. * aout-target.h (MY (object_p)): Likewise.
  2287. * aoutx.h (aout_find_nearest_line, aout_link_write_symbols): Likewise.
  2288. * archive.c (find_nested_archive, _bfd_generic_read_ar_hdr_mag),
  2289. (_bfd_construct_extended_name_table, _bfd_bsd44_write_ar_hdr),
  2290. (_bfd_archive_bsd44_construct_extended_name_table),
  2291. (_bfd_write_archive_contents, _bfd_compute_and_write_armap),
  2292. (_bfd_bsd_write_armap): Likewise.
  2293. * bfd.c (bfd_errmsg, _bfd_doprnt): Likewise.
  2294. * cache.c (bfd_open_file): Likewise.
  2295. * ecoff.c (_bfd_ecoff_write_armap): Likewise.
  2296. * ecofflink.c (bfd_ecoff_debug_accumulate_other): Likewise.
  2297. * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
  2298. * elf32-frv.c (elf32_frv_relocate_section): Likewise.
  2299. * elf32-hppa.c (elf32_hppa_final_link): Likewise.
  2300. * elf32-nds32.c (nds32_elf_output_symbol_hook),
  2301. (patch_tls_desc_to_ie): Likewise.
  2302. * elf32-spu.c (sort_bfds, print_one_overlay_section),
  2303. (spu_elf_auto_overlay): Likewise.
  2304. * elf64-hppa.c (elf_hppa_final_link): Likewise.
  2305. * elf64-ia64-vms.c (elf64_ia64_size_dynamic_sections): Likewise.
  2306. * elfcore.h (elf_core_file_matches_executable_p): Likewise.
  2307. * elflink.c (bfd_elf_size_dynamic_sections),
  2308. (elf_link_input_bfd): Likewise.
  2309. * linker.c (_bfd_generic_link_output_symbols): Likewise.
  2310. * mach-o.c (bfd_mach_o_follow_dsym),
  2311. (bfd_mach_o_close_and_cleanup): Likewise.
  2312. * opncls.c (_bfd_delete_bfd, _maybe_make_executable),
  2313. (find_separate_debug_file, get_build_id_name): Likewise.
  2314. * pdp11.c (aout_find_nearest_line, aout_link_write_symbols): Likewise.
  2315. * plugin.c (bfd_plugin_open_input): Likewise.
  2316. * rs6000-core.c (rs6000coff_core_file_matches_executable_p): Likewise.
  2317. * som.c (som_write_armap): Likewise.
  2318. * srec.c (srec_write_record, srec_write_symbols): Likewise.
  2319. * vms-lib.c (_bfd_vms_lib_get_imagelib_file),
  2320. (_bfd_vms_lib_write_archive_contents): Likewise.
  2321. * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
  2322. 2020-05-19 Alan Modra <amodra@gmail.com>
  2323. PR 25713
  2324. * bfdio.c (_bfd_real_fopen): Typo fix.
  2325. 2020-05-18 Nick Clifton <nickc@redhat.com>
  2326. PR 26005
  2327. * elf.c (bfd_section_from_shdr): Use bfd_malloc to allocate memory
  2328. for the sections_being_created array.
  2329. 2020-05-18 Alan Modra <amodra@gmail.com>
  2330. * ecoff.c (ecoff_slurp_reloc_table): Malloc external_relocs so
  2331. they can be freed without also freeing internal_relocs.
  2332. 2020-05-18 Jaydeep Chauhan <jaydeepchauhan1494@gmail.com>
  2333. PR 25713
  2334. * bfdio.c (_bfd_real_fopen): Convert UNIX style sirectory
  2335. separators into DOS style when creating a WIN32 fullpath.
  2336. 2020-05-14 Nelson Chu <nelson.chu@sifive.com>
  2337. * elfnn-riscv.c (elfNN_riscv_mkobject): New function. We need this
  2338. to initialize RISC-V tdata.
  2339. 2020-05-12 Gunther Nikl <gnikl@justmail.de>
  2340. * aoutx.h (NAME (aout, swap_std_reloc_out)): Reject an unsupported
  2341. relocation size.
  2342. 2020-05-11 Alan Modra <amodra@gmail.com>
  2343. * elf64-ppc.c (xlate_pcrel_opt): Handle lxvp and stxvp.
  2344. 2020-05-11 Alan Modra <amodra@gmail.com>
  2345. * elf64-ppc.c: Rename powerxx to power10 throughout.
  2346. 2020-05-11 Alan Modra <amodra@gmail.com>
  2347. PR 25961
  2348. * coffgen.c (coff_get_normalized_symtab): Check that buffer
  2349. contains required number of auxents before processing any auxent.
  2350. * coffswap.h (coff_swap_aux_in <C_FILE>): Only swap in extended
  2351. file name from auxents for PE.
  2352. 2020-05-04 Gunther Nikl <gnikl@justmail.de>
  2353. * aout-cris.c (DEFAULT_ARCH): Delete define.
  2354. (MY_set_arch_mach): Likewise.
  2355. (SET_ARCH_MACH): Use bfd_set_arch_mach with an explicit architecture
  2356. of bfd_arch_cris.
  2357. (swap_ext_reloc_in): Add casts to r_index extraction. Mask valid bits
  2358. of r_type before the shift.
  2359. 2020-05-04 Wilco Dijkstra <wdijkstr@arm.com>
  2360. PR ld/25665
  2361. * elfnn-aarch64.c (group_sections): Copy implementation from
  2362. elf32-arm.c.
  2363. 2020-05-01 Alan Modra <amodra@gmail.com>
  2364. PR 25900
  2365. * elfnn-riscv.c (_bfd_riscv_relax_section): Check root.type before
  2366. accessing root.u.def of symbols. Also check root.u.def.section
  2367. is non-NULL. Reverse tests so as to make the logic positive.
  2368. 2020-05-01 Alan Modra <amodra@gmail.com>
  2369. PR 25882
  2370. * elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
  2371. Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
  2372. 2020-05-01 Alan Modra <amodra@gmail.com>
  2373. PR 25882
  2374. * elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Add FIXME.
  2375. * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
  2376. * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
  2377. * elf32-nds32.c (nds32_elf_merge_private_bfd_data): Likewise.
  2378. * elf32-score.c (s3_elf32_score_merge_private_bfd_data): Likewise.
  2379. * elf32-score7.c (s7_elf32_score_merge_private_bfd_data): Likewise.
  2380. * elf32-sh.c (sh_elf_merge_private_data): Likewise.
  2381. * elf32-tic6x.c (elf32_tic6x_merge_attributes): Likewise.
  2382. * elf64-ia64-vms.c (elf64_ia64_merge_private_bfd_data): Likewise.
  2383. * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): Likewise.
  2384. 2020-05-01 Alan Modra <amodra@gmail.com>
  2385. PR 25882
  2386. * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Ignore e_flags
  2387. from shared libraries.
  2388. 2020-04-29 Max Filippov <jcmvbkbc@gmail.com>
  2389. * elf32-xtensa.c (relax_section): Don't negate diff_value for
  2390. XTENSA_NDIFF relocations. Don't add sign bits whe diff_value
  2391. equals 0. Report overflow when the result has negative sign but
  2392. all significant bits are zero.
  2393. 2020-04-29 Gunther Nikl <gnikl@justmail.de>
  2394. * aoutx.h (swap_std_reloc_out): Special case 64 bit relocations.
  2395. (aout_link_reloc_link_order): Likewise. Make r_length an unsigned.
  2396. 2020-04-28 Alan Modra <amodra@gmail.com>
  2397. * vms-alpha.c (_bfd_vms_slurp_etir): Correct divide by zero check.
  2398. Emit warning message.
  2399. 2020-04-27 Tamar Christina <tamar.christina@arm.com>
  2400. * coff-i386.c (COFF_WITH_PE_BIGOBJ): New.
  2401. * coff-x86_64.c (COFF_WITH_PE_BIGOBJ): New.
  2402. * config.bfd (targ_selvecs): Rename x86_64_pe_be_vec
  2403. to x86_64_pe_big_vec as it not a big-endian format.
  2404. (vec i386_pe_big_vec): New.
  2405. * configure.ac: Likewise.
  2406. * targets.c: Likewise.
  2407. * configure: Regenerate.
  2408. * pe-i386.c (TARGET_SYM_BIG, TARGET_NAME_BIG,
  2409. COFF_WITH_PE_BIGOBJ): New.
  2410. * pe-x86_64.c (TARGET_SYM_BIG, TARGET_NAME_BIG):
  2411. New.
  2412. (x86_64_pe_be_vec): Moved.
  2413. 2020-04-23 Anton Kolesov <anton.kolesov@synopsys.com>
  2414. * elf-bfd.h (elfcore_write_arc_v2): Add prototype.
  2415. * elf.c (elfcore_grok_arc_v2): New function.
  2416. (elfcore_grok_note): Call the new function to handle the corresponding
  2417. note.
  2418. (elfcore_write_arc_v2): New function.
  2419. (elfcore_write_register_note): Call the new function to handle the
  2420. corresponding pseudo-sections.
  2421. 2020-04-22 Max Filippov <jcmvbkbc@gmail.com>
  2422. PR ld/25861
  2423. * bfd-in2.h: Regenerated.
  2424. * elf32-xtensa.c (elf_howto_table): New entries for
  2425. R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}.
  2426. (elf_xtensa_reloc_type_lookup, elf_xtensa_do_reloc)
  2427. (relax_section): Add cases for R_XTENSA_PDIFF{8,16,32} and
  2428. R_XTENSA_NDIFF{8,16,32}.
  2429. * libbfd.h (bfd_reloc_code_real_names): Add names for
  2430. BFD_RELOC_XTENSA_PDIFF{8,16,32} and
  2431. BFD_RELOC_XTENSA_NDIFF{8,16,32}.
  2432. * reloc.c: Add documentation for BFD_RELOC_XTENSA_PDIFF{8,16,32}
  2433. and BFD_RELOC_XTENSA_NDIFF{8,16,32}.
  2434. 2020-04-21 Tamar Christina <tamar.christina@arm.com>
  2435. PR binutils/24753
  2436. * compress.c (bfd_get_full_section_contents): Exclude sections with no
  2437. content.
  2438. 2020-04-21 H.J. Lu <hongjiu.lu@intel.com>
  2439. PR ld/25849
  2440. * elf-bfd.h (elf_backend_data): Add
  2441. elf_backend_strip_zero_sized_dynamic_sections.
  2442. (_bfd_elf_strip_zero_sized_dynamic_sections): New prototype.
  2443. * elf64-alpha.c (elf_backend_strip_zero_sized_dynamic_sections):
  2444. New macro.
  2445. * elflink.c (_bfd_elf_strip_zero_sized_dynamic_sections): New
  2446. function.
  2447. * elfxx-target.h (elf_backend_strip_zero_sized_dynamic_sections):
  2448. New macro.
  2449. (elfNN_bed): Add elf_backend_strip_zero_sized_dynamic_sections.
  2450. 2020-04-21 H.J. Lu <hongjiu.lu@intel.com>
  2451. * elf64-alpha.c (alpha_elf_reloc_entry): Replace reltext with
  2452. sec.
  2453. (elf64_alpha_check_relocs): Set sec instead of reltext. Warn
  2454. DT_TEXTREL with -M.
  2455. (elf64_alpha_calc_dynrel_sizes): Warn DT_TEXTREL with -M.
  2456. 2020-04-21 Nick Clifton <nickc@redhat.com>
  2457. * po/sr.po: Updated Serbian translation.
  2458. 2020-04-21 Alan Modra <amodra@gmail.com>
  2459. * elf32-sh.c (sh_elf_relocate_section): Remove STO_SH5_ISA32
  2460. processing.
  2461. 2020-04-20 Stephen Casner <casner@acm.org>
  2462. * pdp11.c (N_STAB): Modify value to avoid conflict with N_EXT
  2463. causing globals from linker script to be treated as debug symbols.
  2464. (translate_symbol_table): Don't sign-extend symbol values from 16
  2465. to 64 bits in nm output.
  2466. 2020-04-20 Alan Modra <amodra@gmail.com>
  2467. * elf64-ppc.c (ppc64_elf_size_stubs): Strip relbrlt too.
  2468. 2020-04-18 Alan Modra <amodra@gmail.com>
  2469. * section.c (bfd_is_const_section): Correct test for special
  2470. sections.
  2471. * bfd-in2.h: Regenerate.
  2472. 2020-04-17 Alan Modra <amodra@gmail.com>
  2473. PR 25842
  2474. * elf.c (_bfd_elf_get_symbol_version_string): Don't segfault on
  2475. NULL nodename.
  2476. 2020-04-16 Nick Clifton <nickc@redhat.com>
  2477. PR 25803
  2478. * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Replace an
  2479. abort with a more helpful error message.
  2480. 2020-04-16 Alan Modra <amodra@gmail.com>
  2481. PR 25827
  2482. * dwarf2.c (scan_unit_for_symbols): Wrap overlong lines. Don't
  2483. strdup(0).
  2484. 2020-04-15 Fangrui Song <maskray@google.com>
  2485. PR binutils/24613
  2486. * coff-rs6000.c (xcoff_ppc_relocate_section): Change RM_GENERATE_ERROR
  2487. to RM_DIAGNOSE plus a check of warn_unresolved_syms.
  2488. * coff64-rs6000.c (xcoff_ppc_relocate_section): Likewise.
  2489. * elf-bfd.h (_bfd_elf_large_com_section): Likewise.
  2490. * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
  2491. * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
  2492. * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
  2493. * elf32-sh.c (sh_elf_relocate_section): Likewise.
  2494. * elf32-spu.c (spu_elf_relocate_section): Likewise.
  2495. * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
  2496. * elflink.c (elf_link_output_extsym): Likewise.
  2497. * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
  2498. 2020-04-15 Alan Modra <amodra@gmail.com>
  2499. PR 25823
  2500. * peXXigen.c (_bfd_XXi_swap_sym_in <C_SECTION>): Don't use a
  2501. pointer into strings that may be freed for section name, always
  2502. allocate a new string.
  2503. 2020-04-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
  2504. Jan W. Jagersma <jwjagersma@gmail.com>
  2505. * coff-go32.c (COFF_GO32, IMAGE_SCN_LNK_NRELOC_OVFL)
  2506. (coff_SWAP_scnhdr_in, coff_SWAP_scnhdr_out): Define.
  2507. (_bfd_go32_swap_scnhdr_in, _bfd_go32_swap_scnhdr_out)
  2508. (_bfd_go32_mkobject): New functions.
  2509. * coff-stgo32.c (IMAGE_SCN_LNK_NRELOC_OVFL)
  2510. (coff_SWAP_scnhdr_in, coff_SWAP_scnhdr_out): Define.
  2511. (go32exe_mkobject): Call _bfd_go32_mkobject.
  2512. * coffcode.h (COFF_WITH_EXTENDED_RELOC_COUNTER): Define.
  2513. (coff_set_alignment_hook): Define function for COFF_GO32_EXE
  2514. and COFF_GO32.
  2515. (coff_write_relocs): Enable extended reloc counter code if
  2516. COFF_WITH_EXTENDED_RELOC_COUNTER is defined. Test for obj_go32.
  2517. (coff_write_object_contents): Likewise. Pad section headers
  2518. for COFF_GO32 and COFF_GO32EXE. Use bfd_coff_swap_scnhdr_out
  2519. instead of coff_swap_scnhdr_out.
  2520. * cofflink.c (_bfd_coff_final_link): Test also for obj_go32 to
  2521. enable extended reloc counter.
  2522. * coffswap.h: (coff_swap_scnhdr_in, coff_swap_scnhdr_out):
  2523. Declare with ATTRIBUTE_UNUSED.
  2524. * libcoff-in.h: (struct coff_tdata): New field go32.
  2525. (obj_go32): Define.
  2526. * libcoff.h: Regenerate.
  2527. 2020-04-14 Fangrui Song <maskray@google.com>
  2528. PR gas/25768
  2529. * elf.c (assign_section_numbers): Always set .stab sh_entsize to
  2530. 12.
  2531. 2020-04-14 Stephen Casner <casner@acm.org>
  2532. PR ld/25677
  2533. * pdp11.c: Add implementation of --imagic option.
  2534. (adjust_o_magic): Fix objcopy --extract-symbol test.
  2535. * libaout.h (enum aout_magic): Add i_magic.
  2536. 2020-04-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
  2537. Nick Clifton <nickc@redhat.com>
  2538. * elf32-sparc.c (sparc_final_write_processing): Fix whitespace.
  2539. <0>: Ignore.
  2540. <default>: Error rather than abort.
  2541. 2020-04-03 H.J. Lu <hongjiu.lu@intel.com>
  2542. PR ld/25767
  2543. * elf.c (_bfd_elf_fixup_group_sections): Remove zero-sized
  2544. relocation section from section group.
  2545. 2020-04-02 Jan W. Jagersma <jwjagersma@gmail.com>
  2546. * bfdio.c (bfd_bread, bfd_tell, bfd_seek, bfd_mmap): Always add
  2547. bfd->origin to file offset.
  2548. * bfdwin.c (bfd_get_file_window): Likewise.
  2549. * bfd.c: Clarify the use of the bfd->origin field.
  2550. * bfd-in2.h: Regenerate.
  2551. * coff-i386.c: Don't include go32exe.h. Allow overriding
  2552. coff_write_object_contents via COFF_WRITE_CONTENTS.
  2553. * coff-stgo32.c (go32exe_cleanup, go32exe_mkobject)
  2554. (go32exe_write_object_contents): New functions.
  2555. (go32exe_temp_stub, go32exe_temp_stub_size): New static globals.
  2556. (COFF_WRITE_CONTENTS, GO32EXE_DEFAULT_STUB_SIZE): Define.
  2557. (create_go32_stub): Remove check for 2k size limit. Read stub
  2558. from go32exe_temp_stub if present.
  2559. (go32_stubbed_coff_bfd_copy_private_bfd_data): Allocate and
  2560. copy variable-length stub.
  2561. (go32_check_format): Read stub to go32exe_temp_stub, set
  2562. origin, return go32exe_cleanup.
  2563. (adjust_filehdr_in_post, adjust_filehdr_out_pre)
  2564. (adjust_filehdr_out_post, adjust_scnhdr_in_post)
  2565. (adjust_scnhdr_out_pre, adjust_scnhdr_out_post)
  2566. (adjust_aux_in_post, adjust_aux_out_pre, adjust_aux_out_post):
  2567. Remove functions and their associated #defines.
  2568. * coffcode.h (coff_mkobject_hook): Remove stub copying code.
  2569. * libcoff-in.h: (struct coff_tdata): New field stub_size.
  2570. Rename field go32stub to stub.
  2571. * libcoff.h: Regenerate.
  2572. * coff-stgo32.c (go32_check_format): Rename to...
  2573. (go32exe_check_format): ...this.
  2574. (go32_stubbed_coff_bfd_copy_private_bfd_data): Rename to...
  2575. (go32exe_copy_private_bfd_data): ...this.
  2576. (stub_bytes): Rename to...
  2577. (go32exe_default_stub): ...this.
  2578. (create_go32_stub): Rename to...
  2579. (go32exe_create_stub): ...this.
  2580. * coff-stgo32.c (go32exe_copy_private_bfd_data): Avoid realloc
  2581. when possible.
  2582. 2020-04-01 H.J. Lu <hongjiu.lu@intel.com>
  2583. PR ld/25749
  2584. PR ld/25754
  2585. * elf32-i386.c (elf_i386_convert_load_reloc): Convert load
  2586. relocation to R_386_32 for relocation against non-preemptible
  2587. absolute symbol.
  2588. (elf_i386_check_relocs): Call _bfd_elf_x86_valid_reloc_p. Don't
  2589. allocate dynamic relocation for non-preemptible absolute symbol.
  2590. (elf_i386_relocate_section): Pass sec to
  2591. GENERATE_DYNAMIC_RELOCATION_P.
  2592. * elf64-x86-64.c (R_X86_64_converted_reloc_bit): Moved.
  2593. (elf_x86_64_convert_load_reloc): Covert load relocation to
  2594. R_X86_64_32S or R_X86_64_32 for relocation against non-preemptible
  2595. absolute symbol. Don't convert to R_X86_64_32S nor R_X86_64_32
  2596. for non-preemptible absolute symbol if they overflow.
  2597. (elf_x86_64_check_relocs): Call _bfd_elf_x86_valid_reloc_p. Set
  2598. tls_type for GOT slot to GOT_ABS for non-preemptible absolute
  2599. symbol. Don't allocate dynamic relocation for non-preemptible
  2600. absolute symbol.
  2601. (elf_x86_64_relocate_section): Don't generate relative relocation
  2602. for GOTPCREL relocations aganst local absolute symbol. Pass sec
  2603. to GENERATE_DYNAMIC_RELOCATION_P.
  2604. * elfxx-x86.c (elf_x86_allocate_dynrelocs): No dynamic relocation
  2605. against non-preemptible absolute symbol.
  2606. (_bfd_elf_x86_valid_reloc_p): New function.
  2607. (_bfd_x86_elf_size_dynamic_sections): No dynamic relocation for
  2608. GOT_ABS GOT slot.
  2609. * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Add an SEC
  2610. argument. Don't generate dynamic relocation against
  2611. non-preemptible absolute symbol.
  2612. (ABS_SYMBOL_P): New.
  2613. (GENERATE_RELATIVE_RELOC_P): Don't generate relative relocation
  2614. against non-preemptible absolute symbol.
  2615. (GOT_ABS): New.
  2616. (R_X86_64_converted_reloc_bit): New. Moved from elf64-x86-64.c.
  2617. (_bfd_elf_x86_valid_reloc_p): New.
  2618. 2020-04-01 Tamar Christina <tamar.christina@arm.com>
  2619. PR ld/16017
  2620. * elf32-arm.c (elf32_arm_populate_plt_entry): Set LSB of the PLT0
  2621. address in the GOT if in thumb only mode.
  2622. 2020-04-01 Tamar Christina <tamar.christina@arm.com>
  2623. * elf32-arm.c (elf32_thumb2_plt_entry): Fix PC-rel offset.
  2624. 2020-04-01 Hans-Peter Nilsson <hp@bitrange.com>
  2625. * mmo.c (mmo_scan): Create .text section only when needed, not
  2626. from the start.
  2627. 2020-03-31 Alan Modra <amodra@gmail.com>
  2628. * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Correct bfd_bread
  2629. return value check.
  2630. 2020-03-31 Alan Modra <amodra@gmail.com>
  2631. * vms-alpha.c (image_write): Check bounds for sections without
  2632. contents too. Error on non-zero write to section without
  2633. contents.
  2634. (_bfd_vms_slurp_etir): Check return of image_write* functions.
  2635. 2020-03-31 Alan Modra <amodra@gmail.com>
  2636. * tekhex.c (pass_over): Check is_eof before reading buffer.
  2637. 2020-03-30 Nick Clifton <nickc@redhat.com>
  2638. PR binutils/pr25662
  2639. * libcoff-in.h (struct pe_tdata): Rename the insert_timestamp
  2640. field to timestamp and make it an integer.
  2641. * libcoff.h: Regenerate.
  2642. * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Test the timestamp
  2643. field in the pe_data structure rather than the insert_timestamp
  2644. field.
  2645. 2020-03-30 Alan Modra <amodra@gmail.com>
  2646. PR 25745
  2647. * elf64-ppc.c (ppc64_elf_build_stubs): Use asprintf to form
  2648. statistics message.
  2649. 2020-03-26 Nick Clifton <nickc@redhat.com>
  2650. * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): Delete.
  2651. * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Remove
  2652. prototype.
  2653. * libbfd.h: Regenerate.
  2654. 2020-03-26 Alan Modra <amodra@gmail.com>
  2655. * i386msdos.c (msdos_object_p): Catch -1 return from bfd_bread.
  2656. 2020-03-26 Alan Modra <amodra@gmail.com>
  2657. * vms-alpha.c (dst_define_location): Limit size of dst_ptr_offsets
  2658. array.
  2659. (_bfd_vms_slurp_object_records): Rename "err" to "ok".
  2660. 2020-03-25 Nick Clifton <nickc@redhat.com>
  2661. * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): New
  2662. function.
  2663. * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Prototype.
  2664. * libbfd.h: Regenerate.
  2665. 2020-03-25 Shahab Vahedi <shahab@synopsys.com>
  2666. * elf32-arc.c (PRINT_DEBUG_RELOC_INFO_BEFORE): Use the
  2667. correct field name in the output string.
  2668. 2020-03-25 Alan Modra <amodra@gmail.com>
  2669. PR 25662
  2670. * elf.c (assign_file_positions_for_load_sections): Adjust offset
  2671. for SHT_NOBITS section if first in segment.
  2672. 2020-03-24 H.J. Lu <hongjiu.lu@intel.com>
  2673. PR binutils/25708
  2674. * elf-bfd.h (_bfd_elf_get_symbol_version_name): Renamed to ...
  2675. (_bfd_elf_get_symbol_version_string): This.
  2676. * elf.c (_bfd_elf_get_symbol_version_name): Renamed to ...
  2677. (_bfd_elf_get_symbol_version_string): This.
  2678. (bfd_elf_print_symbol): Pass TRUE to
  2679. _bfd_elf_get_symbol_version_string.
  2680. * libbfd-in.h (_bfd_nosymbols_get_symbol_version_string): Add a
  2681. bfd_boolean argument.
  2682. * syms.c (_bfd_nosymbols_get_symbol_version_string): Likewise.
  2683. * targets.c (_bfd_get_symbol_version_string): Likewise.
  2684. (bfd_get_symbol_version_string): Likewise.
  2685. * bfd-in2.h: Regenerated.
  2686. 2020-03-24 Nick Clifton <nickc@redhat.com>
  2687. Jaydeep Chauhan <jaydeepchauhan1494@gmail.com>
  2688. PR 25713
  2689. * bfdio.c (_bfd_real_fopen): Add code to handle long filenames on
  2690. Win32 systems.
  2691. 2020-03-24 Nick Clifton <nickc@redhat.com>
  2692. PR 25681
  2693. * elf.c (_bfd_elf_map_sections_to_segments): When looking for a
  2694. segment to use for PT_GNU_RELRO, ignore empty sections in a
  2695. segment's current list.
  2696. 2020-03-24 H.J. Lu <hongjiu.lu@intel.com>
  2697. PR binutils/25717
  2698. * elf-bfd.h (elf_obj_tdata): Change num_group to unsigned int.
  2699. 2020-03-24 H.J. Lu <hongjiu.lu@intel.com>
  2700. PR binutils/25708
  2701. * elf-bfd.h (_bfd_elf_get_symbol_version_name): New.
  2702. * elf.c (_bfd_elf_get_symbol_version_name): New function. Based
  2703. on the previous _bfd_elf_get_symbol_version_string.
  2704. (_bfd_elf_get_symbol_version_string): Use it.
  2705. 2020-03-24 Alan Modra <amodra@gmail.com>
  2706. * archive.c (_bfd_generic_read_ar_hdr_mag): Sanity check extended
  2707. name size. Use bfd_malloc rather than bfd_zmalloc, clearing just
  2708. struct areltdata.
  2709. 2020-03-23 Sebastian Huber <sebastian.huber@embedded-brains.de>
  2710. * elflink.c (_bfd_elf_tls_setup): Mention .tdata in comment.
  2711. 2020-03-23 Alan Modra <amodra@gmail.com>
  2712. * ecoff.c (_bfd_ecoff_slurp_armap): Sanity check parsed_size and
  2713. symbol count. Allocate an extra byte to ensure name strings
  2714. are terminated. Sanity check name offsets. Release memory on
  2715. error return.
  2716. 2020-03-23 Alan Modra <amodra@gmail.com>
  2717. * i386msdos.c (msdos_object_p): Don't access e_lfanew when that
  2718. field hasn't been read. Remove unnecessary casts.
  2719. 2020-03-22 Alan Modra <amodra@gmail.com>
  2720. * coff64-rs6000.c (xcoff64_slurp_armap): Ensure size is large
  2721. enough to read number of symbols.
  2722. 2020-03-20 H.J. Lu <hongjiu.lu@intel.com>
  2723. * configure.ac (HAVE_EXECUTABLE_SUFFIX): Removed.
  2724. (EXECUTABLE_SUFFIX): Likewise.
  2725. * config.in: Regenerated.
  2726. * configure: Likewise.
  2727. * plugin.c (bfd_plugin_close_and_cleanup): Defined as
  2728. _bfd_generic_close_and_cleanup.
  2729. (plugin_list_entry): Remove resolution_file, resolution_option,
  2730. real_bfd, real_nsyms, real_syms, lto_nsyms, lto_syms, gcc,
  2731. lto_wrapper, gcc_env and initialized,
  2732. (need_lto_wrapper_p): Removed.
  2733. (get_lto_wrapper): Likewise.
  2734. (setup_lto_wrapper_env): Likewise.
  2735. (register_all_symbols_read): Likewise.
  2736. (egister_cleanup): Likewise.
  2737. (get_symbols): Likewise.
  2738. (add_input_file): Likewise.
  2739. (bfd_plugin_set_program_name): Remove need_lto_wrapper.
  2740. (add_symbols): Updated.
  2741. (try_claim): Likewise.
  2742. (try_load_plugin): Likewise.
  2743. (bfd_plugin_canonicalize_symtab): Likewise.
  2744. * plugin.h (bfd_plugin_set_program_name): Remove int argument.
  2745. (plugin_data_struct): Remove real_bfd, real_nsyms and real_syms.
  2746. 2020-03-19 H.J. Lu <hongjiu.lu@intel.com>
  2747. PR binutils/25640
  2748. * plugin.c (plugin_list_entry): Add has_symbol_type.
  2749. (add_symbols_v2): New function.
  2750. (bfd_plugin_open_input): Don't invoke LTO wrapper if LTO plugin
  2751. provides symbol type.
  2752. (try_load_plugin): Add LDPT_ADD_SYMBOLS_V2.
  2753. (bfd_plugin_canonicalize_symtab): Use LTO plugin symbol type if
  2754. available.
  2755. 2020-03-20 Alan Modra <amodra@gmail.com>
  2756. * coff-rs6000.c (_bfd_xcoff_slurp_armap): Ensure size is large
  2757. enough to read number of symbols.
  2758. 2020-03-20 Alan Modra <amodra@gmail.com>
  2759. * elf.c (_bfd_elf_setup_sections): Don't test known non-NULL
  2760. backend functions for NULL before calling.
  2761. (copy_special_section_fields, _bfd_elf_copy_private_bfd_data),
  2762. (bfd_section_from_shdr, assign_section_numbers): Likewise.
  2763. * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): Likewise.
  2764. * elfnn-ia64.c (ignore_errors): New function.
  2765. (elf_backend_link_order_error_handler): Redefine as ignore_errors.
  2766. 2020-03-19 Nick Clifton <nickc@redhat.com>
  2767. PR 25676
  2768. * dwarf2.c (struct varinfo): Add unit_offset field to record the
  2769. location of the varinfo in the unit's debug info data. Change the
  2770. type of the stack field to a boolean.
  2771. (lookup_var_by_offset): New function. Returns the varinfo
  2772. structure for the variable described at the given offset in the
  2773. unit's debug info.
  2774. (scan_unit_for_symbols): Add support for variables which have the
  2775. DW_AT_specification attribute.
  2776. 2020-03-19 Nick Clifton <nickc@redhat.com>
  2777. PR 25699
  2778. * elf.c (bfd_elf_set_group_contents): Replace assertion with an
  2779. error return.
  2780. 2020-03-19 Sebastian Huber <sebastian.huber@embedded-brains.de>
  2781. * elfxx-riscv.c (riscv_parse_subset): Don't use C99.
  2782. 2020-03-18 Nick Clifton <nickc@redhat.com>
  2783. PR 25673
  2784. * elf.c (_bfd_elf_write_secondary_reloc_section): Fix illegal
  2785. memory access when processing a corrupt secondary reloc section.
  2786. 2020-03-18 Christophe Lyon <christophe.lyon@linaro.org>
  2787. * elf32-arm.c (arm_build_one_stub): Emit a fatal error message
  2788. instead of calling abort.
  2789. * elf32-csky.c (csky_build_one_stub): Likewise.
  2790. * elf32-hppa.c (hppa_build_one_stub): Likewise.
  2791. * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
  2792. * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
  2793. * elf32-metag.c (metag_build_one_stub): Likewise.
  2794. * elf32-nios2.c (nios2_build_one_stub): Likewise.
  2795. * elf64-ppc.c (ppc_build_one_stub): Likewise.
  2796. (ppc_size_one_stub): Likewise.
  2797. * elfnn-aarch64.c (aarch64_build_one_stub): Likewise.
  2798. 2020-03-17 Nick Clifton <nickc@redhat.com>
  2799. PR 25688
  2800. * elf.c (_bfd_elf_copy_special_section_fields): Replace assertions
  2801. with error messages.
  2802. 2020-03-17 Nick Clifton <nickc@redhat.com>
  2803. PR 25687
  2804. * elf.c (_bfd_elf_slurp_secondary_reloc_section): Remove redundant
  2805. free. Add free on another failure path.
  2806. 2020-03-16 Alan Modra <amodra@gmail.com>
  2807. PR 25675
  2808. * elf.c (elf_sort_segments): Don't call bfd_octets_per_byte unless
  2809. we have a non-zero section count. Do lma comparison in octets.
  2810. 2020-03-16 Alan Modra <amodra@gmail.com>
  2811. * vms-alpha.c (dst_restore_location): Validate index into
  2812. dst_ptr_offsets array before accessing. Return status.
  2813. (dst_retrieve_location): Similarly, making "loc" parameter a
  2814. pointer to return value.
  2815. (_bfd_vms_slurp_etir): Update calls to above functions.
  2816. 2020-03-14 Kamil Rytarowski <n54@gmx.com>
  2817. * configure.ac: Include netbsd-core.lo for all NetBSD arm and mips
  2818. targets.
  2819. * configure: Regenerated.
  2820. 2020-03-14 Alan Modra <amodra@gmail.com>
  2821. * section.c (BFD_FAKE_SECTIONS): Formatting.
  2822. * bfd-in2.h: Regenerate.
  2823. 2020-03-13 Kamil Rytarowski <n54@gmx.com>
  2824. * elf.c (elfcore_grok_netbsd_note): Add support for
  2825. NT_NETBSDCORE_LWPSTATUS notes.
  2826. 2020-03-13 Christophe Lyon <christophe.lyon@linaro.org>
  2827. * bfd-in2.h: Regenerate.
  2828. * section.c (asection): Add already_assigned field.
  2829. (BFD_FAKE_SECTION): Add default initializer for it.
  2830. * ecoff.c (bfd_debug_section): Initialize already_assigned field.
  2831. * elf32-arm.c (arm_build_one_stub): Add support for
  2832. non_contiguous_regions.
  2833. * elf32-csky.c (csky_build_one_stub): Likewise.
  2834. * elf32-hppa.c (hppa_build_one_stub): Likewise.
  2835. * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
  2836. * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
  2837. * elf32-metag.c (metag_build_one_stub): Likewise.
  2838. * elf32-nios2.c (nios2_build_one_stub): Likewise.
  2839. * elf64-ppc.c (ppc_build_one_stub): Likewise.
  2840. (ppc_size_one_stub): Likewise.
  2841. * elfnn-aarch64.c (aarch64_build_one_stub): Likewise.
  2842. * elflink.c (elf_link_input_bfd): Likewise.
  2843. 2020-03-13 H.J. Lu <hongjiu.lu@intel.com>
  2844. PR ld/24920
  2845. * elf-linker-x86.h (elf_linker_x86_params): Add
  2846. static_before_all_inputs and has_dynamic_linker.
  2847. * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
  2848. dynamic input objects if -static is passed at command-line
  2849. before all input files without --dynamic-linker unless
  2850. --no-dynamic-linker is used.
  2851. 2020-03-13 Kamil Rytarowski <n54@gmx.com>
  2852. * elf.c (elfcore_grok_netbsd_note): Add support for aarch64.
  2853. 2020-03-13 Christian Eggers <ceggers@gmx.de>
  2854. * bfd.c (bfd_record_phdr): New local "opb". Fix assignment of
  2855. "p_paddr" from "at".
  2856. * elfcode.h (bfd_from_remote_memory): Add units to several
  2857. parameters. New local "opb". Fix usage of p_align. Fix
  2858. calculation of "localbase" from "ehdr_vma" and "p_vaddr". Fix
  2859. call of target_read_memory.
  2860. * elflink.c (elf_fixup_link_order): Fix scope of "s" local. Fix
  2861. calculation of "offset" and "output_offset".
  2862. (bfd_elf_final_link): New local "opb". Fix calculation of "size"
  2863. from "offset" and fix calculation of "end" from "vma+size". Fix
  2864. comparison between "sh_addr" and "vma"/"output_offset".
  2865. (bfd_elf_discard_info): Fix calculation of "eh_alignment".
  2866. * elf-bfd.h (struct elf_link_hash_table): Add unit to tls_size
  2867. member.
  2868. * elf.c (_bfd_elf_map_sections_to_segments): Add unit (bytes/
  2869. octets) to "wrap_to2 and "phdr_size" locals. Fix calculation of
  2870. "wrap_to" value. Add unit (bytes) to phdr_lma variable. Fix
  2871. assignment of p_paddr from phdr_lma. Fix comparison between
  2872. "lma+size" and "next->lma".
  2873. (elf_sort_segments): Fix assignment from p_paddr to lma.
  2874. (assign_file_positions_for_load_sections): Add unit (bytes) to
  2875. local "align". Fix calculation of local "off_adjust". Fix
  2876. calculation of local "filehdr_vaddr".
  2877. (assign_file_positions_for_non_load_sections): New local "opb".
  2878. Fix calculation of "end" from "p_size". Fix comparison between
  2879. "vma+SECTION_SIZE" and "start". Fix calculation of "p_memsz"
  2880. from "end" and "p_vaddr".
  2881. (rewrite_elf_program_header): Fix comparison between p_vaddr and
  2882. vma. Fix assignment to p_paddr from lma. Fix comparison between
  2883. p_paddr and lma. Fix assignment to p_paddr from lma.
  2884. * merge.c (sec_merge_emit): New local "opb". Convert
  2885. "alignment_power" to octets.
  2886. (_bfd_add_merge_section): New locals "alignment_power" and
  2887. "opb". Fix comparison between "alignment_power" and
  2888. "sizeof(align)".
  2889. (_bfd_merge_sections): New local "opb". Divide size by opb
  2890. before checking align mask.
  2891. 2020-03-13 Christian Eggers <ceggers@gmx.de>
  2892. * elf.c (_bfd_elf_make_section_from_shdr): Introduce new temp
  2893. opb. Divide Elf_Internal_Shdr::sh_addr by opb when setting
  2894. section LMA/VMA.
  2895. (_bfd_elf_make_section_from_phdr): Similarly.
  2896. (elf_fake_sections): Fix calculation of
  2897. Elf_Internal_shdr::sh_addr from section VMA.
  2898. (_bfd_elf_map_sections_to_segments): Fix mixup between octets
  2899. and bytes.
  2900. (assign_file_positions_for_load_sections): Fix calculations of
  2901. Elf_Internal_shdr::p_vaddr and p_paddr from section LMA/VMA. Fix
  2902. comparison between program header address and section LMA.
  2903. (assign_file_positions_for_non_load_sections): Likewise.
  2904. (rewrite_elf_program_header): Likewise. Introduce new temp opb.
  2905. (IS_CONTAINED_BY_VMA): Add parameter opb.
  2906. (IS_CONTAINED_BY_LMA,IS_SECTION_IN_INPUT_SEGMENT,
  2907. INCLUDE_SECTION_IN_SEGMENT): Likewise.
  2908. (copy_elf_program_header): Update call to ELF_SECTION_IN_SEGMENT.
  2909. Fix calculations of p_addr_valid and p_vaddr_offset.
  2910. * elflink.c (elf_link_add_object_symbols): Multiply section VMA
  2911. with octets per byte when comparing against p_vaddr.
  2912. 2020-03-11 Alan Modra <amodra@gmail.com>
  2913. * som.c (setup_sections): Sanity check subspace.name.
  2914. 2020-03-11 Alan Modra <amodra@gmail.com>
  2915. * elf64-ppc.c (ppc64_elf_inline_plt): Do increment rel in for loop.
  2916. 2020-03-10 Alan Modra <amodra@gmail.com>
  2917. PR 25648
  2918. * ihex.c (ihex_write_object_contents): Don't assume ordering of
  2919. addresses here.
  2920. 2020-03-09 Alan Modra <amodra@gmail.com>
  2921. * wasm-module.c (wasm_scan): Sanity check file name length
  2922. before allocating memory. Move common section setup code. Do
  2923. without bfd_tell to calculate section size.
  2924. 2020-03-06 Nick Clifton <nickc@redhat.com>
  2925. * elf.c (_bfd_elf_set_section_contents): Replace call to abort
  2926. with error messages and failure return values.
  2927. 2020-03-05 Max Filippov <jcmvbkbc@gmail.com>
  2928. * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
  2929. relocation sections for any removed reference to a dynamic symbol.
  2930. 2020-03-05 Nick Clifton <nickc@redhat.com>
  2931. * elf-bfd.h (struct elf_backend_data): Add new fields:
  2932. init_secondary_reloc_section, slurp_secondary_reloc_section,
  2933. write_secondary_reloc_section.
  2934. (_bfd_elf_init_secondary_reloc_section): Prototype.
  2935. (_bfd_elf_slurp_secondary_reloc_section): Prototype.
  2936. (_bfd_elf_write_secondary_reloc_section): Prototype.
  2937. * elf.c ( bfd_section_from_shdr): Invoke the new
  2938. init_secondary_reloc_section backend function, if defined, when a
  2939. second reloc section is encountered.
  2940. (swap_out_syms): Invoke the new symbol_section_index function, if
  2941. defined, when computing the section index of an OS/PROC specific
  2942. symbol.
  2943. (_bfd_elf_init_secondary_reloc_section): New function.
  2944. (_bfd_elf_slurp_secondary_reloc_section): New function.
  2945. (_bfd_elf_write_secondary_reloc_section): New function.
  2946. (_bfd_elf_copy_special_section_fields): New function.
  2947. * elfcode.h (elf_write_relocs): Invoke the new
  2948. write_secondary_relocs function, if defined, in order to emit
  2949. secondary relocs.
  2950. (elf_slurp_reloc_table): Invoke the new slurp_secondary_relocs
  2951. function, if defined, in order to read in secondary relocs.
  2952. * elfxx-target.h (elf_backend_copy_special_section_fields):
  2953. Provide a non-NULL default definition.
  2954. (elf_backend_init_secondary_reloc_section): Likewise.
  2955. (elf_backend_slurp_secondary_reloc_section): Likewise.
  2956. (elf_backend_write_secondary_reloc_section): Likewise.
  2957. (struct elf_backend_data elfNN_bed): Add initialisers for the new
  2958. fields.
  2959. * configure.ac (score_elf32_[bl]e_vec): Add elf64.lo
  2960. * configure: Regenerate.
  2961. 2020-03-05 Alan Modra <amodra@gmail.com>
  2962. * archive64.c (_bfd_archive_64_bit_slurp_armap): Check parsed_size
  2963. against file size before allocating memory. Use bfd_alloc rather
  2964. than bfd_zalloc for carsym/strings memory.
  2965. 2020-03-04 Alan Modra <amodra@gmail.com>
  2966. * elf.c (elf_fake_sections): Ensure sh_addralign is such that
  2967. sh_addr mod sh_addalign is zero.
  2968. 2020-03-04 Alan Modra <amodra@gmail.com>
  2969. * format.c (bfd_check_format_matches): Call cleanup on error exit.
  2970. 2020-03-03 Alan Modra <amodra@gmail.com>
  2971. * format.c (struct bfd_preserve): Add cleanup field.
  2972. (bfd_preserve_save): Add cleanup param and save.
  2973. (bfd_preserve_restore): Return cleanup.
  2974. (bfd_preserve_finish): Call the cleanup for the discarded match.
  2975. (bfd_check_format_matches): Pass cleanup to bfd_preserve_save,
  2976. and clear when preserving a match. Restore cleanup too when
  2977. restoring that match.
  2978. 2020-03-02 Alan Modra <amodra@gmail.com>
  2979. * cisco-core.c (cisco_core_file_p): Return bfd_cleanup.
  2980. * hpux-core.c (hpux_core_core_file_p): Update prototype.
  2981. * sco5-core.c (sco5_core_file_p): Return bfd_cleanup.
  2982. (core_sco5_vec): Correct initialisers.
  2983. 2020-03-02 Alan Modra <amodra@gmail.com>
  2984. * aix386-core.c (aix386_core_file_p): Return bfd_cleanup.
  2985. * aix5ppc-core.c (xcoff64_core_p): Likewise.
  2986. * cisco-core.c (cisco_core_file_validate): Likewise.
  2987. * hppabsd-core.c (hppabsd_core_core_file_p): Likewise.
  2988. * hpux-core.c (hpux_core_core_file_p): Likewise.
  2989. * irix-core.c (irix_core_core_file_p): Likewise.
  2990. * lynx-core.c (lynx_core_file_p): Likewise.
  2991. * netbsd-core.c (netbsd_core_file_p): Likewise.
  2992. * osf-core.c (osf_core_core_file_p): Likewise.
  2993. * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
  2994. * sco5-core.c (sco5_core_file_p): Likewise.
  2995. 2020-03-02 H.J. Lu <hongjiu.lu@intel.com>
  2996. * trad-core.c (trad_unix_core_file_p): Return bfd_cleanup.
  2997. 2020-03-02 Alan Modra <amodra@gmail.com>
  2998. * targets.c (bfd_cleanup): New typedef.
  2999. (struct bfd <_bfd_check_format>): Return a bfd_cleanup.
  3000. * libbfd-in.h (_bfd_no_cleanup): Define.
  3001. * format.c (bfd_reinit): Add cleanup parameter, call it.
  3002. (bfd_check_format_matches): Set cleanup from _bfd_check_format
  3003. call and pass to bfd_reinit. Delete temp, use abfd->xvec instead.
  3004. * aout-target.h (callback, object_p): Return bfd_cleanup.
  3005. * aout-tic30.c (tic30_aout_callback, tic30_aout_object_p): Likewise.
  3006. * archive.c (bfd_generic_archive_p): Likewise.
  3007. * binary.c (binary_object_p): Likewise.
  3008. * coff-alpha.c (alpha_ecoff_object_p): Likewise.
  3009. * coff-ia64.c (ia64coff_object_p): Likewise.
  3010. * coff-rs6000.c (_bfd_xcoff_archive_p, rs6000coff_core_p): Likewise.
  3011. * coff-sh.c (coff_small_object_p): Likewise.
  3012. * coff-stgo32.c (go32_check_format): Likewise.
  3013. * coff64-rs6000.c (xcoff64_archive_p, rs6000coff_core_p),
  3014. (xcoff64_core_p): Likewise.
  3015. * coffgen.c (coff_real_object_p, coff_object_p): Likewise.
  3016. * elf-bfd.h (bfd_elf32_object_p, bfd_elf32_core_file_p),
  3017. (bfd_elf64_object_p, bfd_elf64_core_file_p): Likewise.
  3018. * elfcode.h (elf_object_p): Likewise.
  3019. * elfcore.h (elf_core_file_p): Likewise.
  3020. * i386msdos.c (msdos_object_p): Likewise.
  3021. * ihex.c (ihex_object_p): Likewise.
  3022. * libaout.h (some_aout_object_p): Likewise.
  3023. * libbfd-in.h (bfd_generic_archive_p, _bfd_dummy_target),
  3024. (_bfd_vms_lib_alpha_archive_p, _bfd_vms_lib_ia64_archive_p): Likewise.
  3025. * libbfd.c (_bfd_dummy_target): Likewise.
  3026. * libcoff-in.h (coff_object_p): Likewise.
  3027. * mach-o-aarch64.c (bfd_mach_o_arm64_object_p),
  3028. (bfd_mach_o_arm64_core_p): Likewise.
  3029. * mach-o-arm.c (bfd_mach_o_arm_object_p),
  3030. (bfd_mach_o_arm_core_p): Likewise.
  3031. * mach-o-i386.c (bfd_mach_o_i386_object_p),
  3032. (bfd_mach_o_i386_core_p): Likewise.
  3033. * mach-o-x86-64.c (bfd_mach_o_x86_64_object_p),
  3034. (bfd_mach_o_x86_64_core_p): Likewise.
  3035. * mach-o.c (bfd_mach_o_header_p, bfd_mach_o_gen_object_p),
  3036. (bfd_mach_o_gen_core_p, bfd_mach_o_fat_archive_p): Likewise.
  3037. * mach-o.h (bfd_mach_o_object_p, bfd_mach_o_core_p),
  3038. (bfd_mach_o_fat_archive_p, bfd_mach_o_header_p): Likewise.
  3039. * mmo.c (mmo_object_p): Likewise.
  3040. * pef.c (bfd_pef_object_p, bfd_pef_xlib_object_p): Likewise.
  3041. * peicode.h (coff_real_object_p, pe_ILF_object_p),
  3042. (pe_bfd_object_p): Likewise.
  3043. * plugin.c (ld_plugin_object_p, bfd_plugin_object_p): Likewise.
  3044. * ppcboot.c (ppcboot_object_p): Likewise.
  3045. * rs6000-core.c (rs6000coff_core_p): Likewise.
  3046. * som.c (som_object_setup, som_object_p): Likewise.
  3047. * srec.c (srec_object_p, symbolsrec_object_p): Likewise.
  3048. * tekhex.c (tekhex_object_p): Likewise.
  3049. * vms-alpha.c (alpha_vms_object_p): Likewise.
  3050. * vms-lib.c (_bfd_vms_lib_archive_p, _bfd_vms_lib_alpha_archive_p),
  3051. (_bfd_vms_lib_ia64_archive_p, _bfd_vms_lib_txt_archive_p): Likewise.
  3052. * wasm-module.c (wasm_object_p): Likewise.
  3053. * xsym.c (bfd_sym_object_p): Likewise.
  3054. * xsym.h (bfd_sym_object_p): Likewise.
  3055. * aoutx.h (some_aout_object_p): Likewise, and callback parameter
  3056. return type.
  3057. * pdp11.c (some_aout_object_p): Likewise.
  3058. * plugin.c (register_ld_plugin_object_p): Update object_p
  3059. parameter type.
  3060. * plugin.h (register_ld_plugin_object_p): Likewise.
  3061. * bfd-in2.h: Regenerate.
  3062. * libbfd.h: Regenerate.
  3063. * libcoff.h: Regenerate.
  3064. 2020-03-02 Alan Modra <amodra@gmail.com>
  3065. * coff-alpha.c (alpha_ecoff_le_vec): Add SEC_SMALL_DATA to
  3066. applicable section flags.
  3067. * coff-mips.c (mips_ecoff_le_vec, mips_ecoff_be_vec): Likewise.
  3068. (mips_ecoff_bele_vec): Likewise.
  3069. * coffcode.h (sec_to_styp_flags): Set SEC_SMALL_DATA for .sdata
  3070. and .sbss sections.
  3071. * ecoff.c (_bfd_ecoff_new_section_hook): Likewise.
  3072. (_bfd_ecoff_styp_to_sec_flags): Likewise.
  3073. 2020-03-02 Alan Modra <amodra@gmail.com>
  3074. * elf32-m32r.c (m32r_elf_section_flags): New function.
  3075. (elf_backend_section_flags): Define.
  3076. * elf32-nds32.c (nds32_elf_section_flags): New function.
  3077. (elf_backend_section_flags): Define.
  3078. * elf32-ppc.c (ppc_elf_section_from_shdr): Set SEC_SMALL_DATA for
  3079. .sbss and .sdata sections.
  3080. * elf32-v850.c (v850_elf_section_from_shdr): Set SEC_SMALL_DATA
  3081. for SHF_V850_GPREL sections.
  3082. * elf64-alpha.c (elf64_alpha_section_from_shdr): Delete outdated
  3083. FIXME.
  3084. * elf64-hppa.c (elf64_hppa_section_from_shdr): Set SEC_SMALL_DATA
  3085. for SHF_PARISC_SHORT sections.
  3086. * elf64-ppc.c (ppc64_elf_section_flags): New function.
  3087. (elf_backend_section_flags): Define.
  3088. * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Set SEC_SMALL_DATA
  3089. for SHF_MIPS_GPREL sections. Delete FIXME.
  3090. 2020-03-02 Alan Modra <amodra@gmail.com>
  3091. * elf-bfd.h (elf_backend_section_flags): Remove flagword* param.
  3092. * elf.c (_bfd_elf_make_section_from_shdr): Set section flags before
  3093. calling elf_backend_section_flags with adjusted params. Use
  3094. newsect->flags past that point.
  3095. (_bfd_elf_new_section_hook): Always set sh_type and sh_flags for
  3096. special sections.
  3097. (_bfd_elf_init_private_section_data): Allow normal sh_type sections
  3098. to have their type overridden, and all sh_flags but processor and
  3099. os specific.
  3100. * elf32-arm.c (elf32_arm_section_flags): Adjust for changed params.
  3101. * elf32-mep.c (mep_elf_section_flags): Likewise.
  3102. * elf32-nios2.c (nios2_elf32_section_flags): Likewise.
  3103. * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
  3104. * elf64-ia64-vms.c (elf64_ia64_section_flags): Likewise.
  3105. * elfnn-ia64.c (elfNN_ia64_section_flags): Likewise.
  3106. * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Exclude the linker
  3107. stub BFD and non-aarch64 input files when scanning for stubs.
  3108. 2020-03-02 Alan Modra <amodra@gmail.com>
  3109. * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Provide an upper
  3110. limit to decompressed element size.
  3111. 2020-03-02 Alan Modra <amodra@gmail.com>
  3112. * vms-lib.c (vms_traverse_index): Add recur_count param and
  3113. update calls. Fail on excessive recursion.
  3114. 2020-03-02 Alan Modra <amodra@gmail.com>
  3115. * vms-alpha.c (vms_get_remaining_object_record): Use
  3116. bfd_realloc_or_free rather than bfd_realloc.
  3117. (add_symbol_entry, vector_grow1, alpha_vms_slurp_relocs): Likewise.
  3118. (dst_define_location, parse_module): Likewise, and check realloc
  3119. return status before using memory. Return status from function
  3120. adjusting all callers.
  3121. 2020-02-28 Alan Modra <amodra@gmail.com>
  3122. * vms-lib.c (_bfd_vms_lib_archive_p): Free memory on error paths.
  3123. 2020-02-28 Alan Modra <amodra@gmail.com>
  3124. * vms-alpha.c (alpha_vms_object_p): Use _bfd_malloc_and_read.
  3125. Remove duplicate undersize check.
  3126. 2020-02-27 Alan Modra <amodra@gmail.com>
  3127. PR 24511
  3128. * mmo.c (mmo_scan): Set SEC_DATA for .data.
  3129. 2020-02-27 Alan Modra <amodra@gmail.com>
  3130. PR 24511
  3131. * syms.c (stt): Trim off all but 'e', 'i' and 'p' entries.
  3132. (coff_section_type): Adjust comment.
  3133. (decode_section_type): Likewise. Call coff_section_type before
  3134. decode_section_type.
  3135. (bfd_decode_symclass): Use 'c' for common sections other than
  3136. the standard one.
  3137. 2020-02-27 Alan Modra <amodra@gmail.com>
  3138. * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Put all data in one
  3139. malloc'd block.
  3140. 2020-02-27 Alan Modra <amodra@gmail.com>
  3141. * bfd.c (bfd_stat_arch_elt): Use vector of containing archive,
  3142. if file is an archive element.
  3143. * bfd-in2.h: Regenerate.
  3144. 2020-02-26 Alan Modra <amodra@gmail.com>
  3145. * archive.c (do_slurp_bsd_armap): Increase minimum parsed_size, and
  3146. bfd_set_error on failing test. Don't bother changing bfd_error on
  3147. file read error. Check symdef_count is multiple of BSD_SYMDEF_SIZE.
  3148. Check sym name is within string buffer. Use size_t for some vars.
  3149. (do_slurp_coff_armap): Use size_t for some variables, fix size of
  3150. int_buf. Don't change bfd_error on file read error. Use
  3151. _bfd_mul_overflow when calculating carsym buffer size. Reorder
  3152. calculations to catch overflows before they occur. malloc and
  3153. free raw armap rather than using bfd_alloc. Read raw armap before
  3154. allocating carsym+strings buffer.
  3155. (_bfd_slurp_extended_name_table): Localize variables. Check
  3156. name size against file size.
  3157. 2020-02-26 Alan Modra <amodra@gmail.com>
  3158. * vms-lib.c (vms_lib_read_index): Release correct buffer.
  3159. 2020-02-26 Alan Modra <amodra@gmail.com>
  3160. * elf32-rx.c (rx_elf_relocate_section): Use bfd_malloc rather than
  3161. malloc. Check for NULL return from bfd_malloc.
  3162. (rx_table_find, rx_table_map): Likewise.
  3163. (rx_set_section_contents): Check bfd_alloc return.
  3164. (rx_dump_symtab): Don't alloc internal_syms or external_syms.
  3165. 2020-02-26 Alan Modra <amodra@gmail.com>
  3166. * aoutx.h: Indent labels correctly. Format error strings.
  3167. * archive.c: Likewise.
  3168. * archive64.c: Likewise.
  3169. * coff-arm.c: Likewise.
  3170. * coff-rs6000.c: Likewise.
  3171. * coff-stgo32.c: Likewise.
  3172. * cpu-arm.c: Likewise.
  3173. * dwarf2.c: Likewise.
  3174. * elf-ifunc.c: Likewise.
  3175. * elf-properties.c: Likewise.
  3176. * elf-s390-common.c: Likewise.
  3177. * elf-strtab.c: Likewise.
  3178. * elf.c: Likewise.
  3179. * elf32-arm.c: Likewise.
  3180. * elf32-bfin.c: Likewise.
  3181. * elf32-cr16.c: Likewise.
  3182. * elf32-csky.c: Likewise.
  3183. * elf32-i386.c: Likewise.
  3184. * elf32-m68k.c: Likewise.
  3185. * elf32-msp430.c: Likewise.
  3186. * elf32-nds32.c: Likewise.
  3187. * elf32-nios2.c: Likewise.
  3188. * elf32-pru.c: Likewise.
  3189. * elf32-xtensa.c: Likewise.
  3190. * elf64-ia64-vms.c: Likewise.
  3191. * elf64-x86-64.c: Likewise.
  3192. * elfcode.h: Likewise.
  3193. * elfcore.h: Likewise.
  3194. * elflink.c: Likewise.
  3195. * elfnn-aarch64.c: Likewise.
  3196. * elfnn-ia64.c: Likewise.
  3197. * elfnn-riscv.c: Likewise.
  3198. * elfxx-mips.c: Likewise.
  3199. * elfxx-sparc.c: Likewise.
  3200. * elfxx-x86.c: Likewise.
  3201. * i386lynx.c: Likewise.
  3202. * merge.c: Likewise.
  3203. * pdp11.c: Likewise.
  3204. * plugin.c: Likewise.
  3205. * reloc.c: Likewise.
  3206. 2020-02-26 Alan Modra <amodra@gmail.com>
  3207. PR 25593
  3208. * elf-bfd.h (struct elf_link_hash_table): Rename "loaded" to
  3209. "dyn_loaded".
  3210. (bfd_elf_add_dt_needed_tag): Declare.
  3211. * elf-strtab.c (_bfd_elf_strtab_restore): Handle NULL buf.
  3212. * elflink.c (bfd_elf_add_dt_needed_tag): Make global and rename
  3213. from elf_add_dt_needed_tag. Remove soname and doit param.
  3214. (elf_link_add_object_symbols): Don't use elf_add_dt_needed_tag
  3215. to see whether as-needed lib is already loaded, use dyn_loaded
  3216. list instead. When saving and restoring around as-needed lib
  3217. handle possibility that dynstr has not been initialised. Don't
  3218. add DT_NEEDED tags here. Limit dyn_loaded list to dynamic libs.
  3219. Mark libs loaded via DT_NEEDED entries of other libs with
  3220. DYN_NO_NEEDED if they should not be mentioned in DT_NEEDED of
  3221. the output.
  3222. (elf_link_check_versioned_symbol): Remove now unneccesary
  3223. DYNAMIC check when traversing dyn_loaded list.
  3224. 2020-02-26 Alan Modra <amodra@gmail.com>
  3225. * bfdio.c (bfd_get_file_size): Ignore bogus archive element sizes.
  3226. 2020-02-25 H.J. Lu <hongjiu.lu@intel.com>
  3227. PR binutils/25584
  3228. * plugin.c (need_lto_wrapper_p): New.
  3229. (bfd_plugin_set_program_name): Add an int argument to set
  3230. need_lto_wrapper_p.
  3231. (get_lto_wrapper): Return FALSE if need_lto_wrapper_p isn't
  3232. set.
  3233. * plugin.h (bfd_plugin_set_program_name): Add an int argument.
  3234. 2020-02-24 Alan Modra <amodra@gmail.com>
  3235. * vms-lib.c (_bfd_vms_lib_archive_p): Correct overflow checks.
  3236. 2020-02-24 Alan Modra <amodra@gmail.com>
  3237. * vms-lib.c (struct carsym_mem): Add limit.
  3238. (vms_add_index): Heed limit.
  3239. (vms_traverse_index): Catch buffer overflows. Remove outdated fixme.
  3240. (vms_lib_read_index): Set up limit. Catch 32-bit overflow.
  3241. Always return actual number read.
  3242. (_bfd_vms_lib_archive_p): Catch buffer overflows. Replace
  3243. assertion with error exit.
  3244. 2020-02-22 Alan Modra <amodra@gmail.com>
  3245. PR 25585
  3246. * elf.c (assign_file_positions_for_load_sections): Continue linking
  3247. on "PHDR segment not covered by LOAD segment" errors.
  3248. 2020-02-21 Alan Modra <amodra@gmail.com>
  3249. * mach-o.c (bfd_mach_o_canonicalize_relocs): Fix ineffective
  3250. overflow check.
  3251. (bfd_mach_o_canonicalize_reloc): Likewise.
  3252. (bfd_mach_o_canonicalize_dynamic_reloc): Likewise. Sanity check
  3253. counts and offsets against file size.
  3254. (bfd_mach_o_build_dysymtab): Fix ineffective overflow check.
  3255. (bfd_mach_o_mangle_sections): Remove unnecessary overflow check.
  3256. (bfd_mach_o_read_symtab_symbols): Sanity check count and offset
  3257. against file size. Delete symbol table error message.
  3258. (bfd_mach_o_read_dysymtab): Sanity check counts and offsets
  3259. against file size.
  3260. (bfd_mach_o_read_symtab): Likewise.
  3261. (bfd_mach_o_read_command): Pass file size.
  3262. (bfd_mach_o_scan): Sanity check command count against file size.
  3263. 2020-02-21 Alan Modra <amodra@gmail.com>
  3264. PR 25569
  3265. * aoutx.h (adjust_o_magic, adjust_z_magic, adjust_n_magic): Use
  3266. "text", "data" and "bss" section pointer vars. Don't update
  3267. section size, just exec header sizes.
  3268. (adjust_sizes_and_vmas): Don't update text section size. Set
  3269. initial exec header a_text. Print exec headers sizes.
  3270. * pdp11.c (adjust_o_magic, adjust_z_magic, adjust_n_magic),
  3271. (adjust_sizes_and_vmas): Similarly. Formatting.
  3272. (final_link): Correct final file extension.
  3273. 2020-02-20 Nick Clifton <nickc@redhat.com>
  3274. * elf-bfd.h (struct elf_backend_data): Add symbol_section_index
  3275. callback.
  3276. * elfxx-target.h (elf_backend_symbol_section_index): Provide
  3277. default definition.
  3278. (elfNN_bed): Initialise the symbol_section_index field.
  3279. * elf.c (swap_out_syms): Call symbol_section_index, if defined, on
  3280. OS and PROC specific section indicies. Warn if converting other
  3281. reserved incidies to SHN_ABS.
  3282. 2020-02-19 Sergey Belyashov <sergey.belyashov@gmail.com>
  3283. PR 25537
  3284. * cpu-z80.c: Add machine type compatibility checking.
  3285. 2020-02-19 H.J. Lu <hongjiu.lu@intel.com>
  3286. PR binutils/25355
  3287. * plugin.c (plugin_list_entry): Remove handle.
  3288. (try_load_plugin): Call dlclose before return.
  3289. 2020-02-19 Alan Modra <amodra@gmail.com>
  3290. * libbfd-in.h (_bfd_constant_p): Define.
  3291. (_bfd_alloc_and_read, _bfd_malloc_and_read): Check read size against
  3292. file size before allocating memory.
  3293. * coffgen.c (_bfd_coff_get_external_symbols): Remove file size check.
  3294. * elf.c (bfd_elf_get_str_section): Likewise.
  3295. (_bfd_elf_slurp_version_tables): Likewise.
  3296. * libbfd.h: Regenerate.
  3297. 2020-02-19 Alan Modra <amodra@gmail.com>
  3298. * libbfd-in.h (_bfd_alloc_and_read, _bfd_malloc_and_read): New.
  3299. * aoutx.h (aout_get_external_symbols): Replace calls to
  3300. bfd_[m]alloc and bfd_bread with call to _bfd_[m]alloc_and_read.
  3301. (slurp_reloc_table): Likewise.
  3302. * archive.c (do_slurp_bsd_armap): Likewise.
  3303. (do_slurp_coff_armap): Likewise.
  3304. * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
  3305. * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
  3306. * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
  3307. * coffcode.h (coff_set_arch_mach_hook, buy_and_read): Likewise.
  3308. * coffgen.c (coff_real_object_p, coff_object_p, build_debug_section),
  3309. (_bfd_coff_get_external_symbols): Likewise.
  3310. * ecoff.c (ecoff_slurp_symbolic_header),
  3311. (_bfd_ecoff_slurp_symbolic_info, ecoff_slurp_reloc_table),
  3312. (_bfd_ecoff_slurp_armap, ecoff_link_add_object_symbols, READ),
  3313. (ecoff_indirect_link_order): Likewise.
  3314. * elf.c (bfd_elf_get_str_section, setup_group, elf_read_notes),
  3315. (_bfd_elf_slurp_version_tables): Likewise.
  3316. * elf32-m32c.c (m32c_elf_relax_section): Likewise.
  3317. * elf32-rl78.c (rl78_elf_relax_section): Likewise.
  3318. * elf32-rx.c (elf32_rx_relax_section): Likewise.
  3319. * elf64-alpha.c (READ): Likewise.
  3320. * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Likewise.
  3321. * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
  3322. * elfcode.h (elf_slurp_symbol_table),
  3323. (elf_slurp_reloc_table_from_section): Likewise.
  3324. * elflink.c (elf_link_add_object_symbols),
  3325. (elf_link_check_versioned_symbol): Likewise.
  3326. * elfxx-mips.c (READ): Likewise.
  3327. * i386lynx.c (slurp_reloc_table): Likewise.
  3328. * lynx-core.c (lynx_core_file_p): Likewise.
  3329. * mach-o.c (bfd_mach_o_canonicalize_relocs),
  3330. (bfd_mach_o_read_symtab_strtab, bfd_mach_o_alloc_and_read),
  3331. (bfd_mach_o_read_prebound_dylib, bfd_mach_o_read_dyld_content
  3332. * pdp11.c (aout_get_external_symbols, slurp_reloc_table
  3333. * pef.c (bfd_pef_print_loader_section, bfd_pef_scan_start_address),
  3334. (bfd_pef_parse_symbols): Likewise.
  3335. * peicode.h (pe_ILF_object_p, pe_bfd_object_p
  3336. * som.c (setup_sections, som_slurp_string_table),
  3337. (som_slurp_reloc_table, som_bfd_count_ar_symbols),
  3338. (som_bfd_fill_in_ar_symbols): Likewise.
  3339. * vms-alpha.c (module_find_nearest_line, evax_bfd_print_dst),
  3340. (evax_bfd_print_image): Likewise.
  3341. * vms-lib.c (_bfd_vms_lib_archive_p): Likewise.
  3342. * wasm-module.c (wasm_scan): Likewise.
  3343. * xcofflink.c (xcoff_link_add_symbols): Likewise.
  3344. * xsym.c (bfd_sym_read_name_table),
  3345. (bfd_sym_print_type_information_table_entry): Likewise.
  3346. * libbfd.h: Regenerate.
  3347. 2020-02-19 Alan Modra <amodra@gmail.com>
  3348. * aoutx.h (slurp_reloc_table): Allocate reloc_cache after
  3349. reading external relocs.
  3350. * ecoff.c (ecoff_slurp_reloc_table): Likewise.
  3351. * archive.c (_bfd_write_archive_contents): Don't twiddle bfd_error
  3352. after bfd_bread.
  3353. * archive64.c (_bfd_archive_64_bit_slurp_armap): Remove unnecessary
  3354. bfd_release.
  3355. * elf32-m32c.c (m32c_offset_for_reloc): Make shndx_buf a bfd_byte*.
  3356. (m32c_elf_relax_section): Likewise.
  3357. * elf32-rl78.c (rl78_offset_for_reloc): Likewise.
  3358. (rl78_elf_relax_section): Likewise.
  3359. * elf32-rx.c (rx_offset_for_reloc): Likewise.
  3360. (elf32_rx_relax_section): Likewise.
  3361. * mach-o.c (bfd_mach_o_alloc_and_read): Move earlier with better
  3362. parameter types and use..
  3363. (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib),
  3364. (bfd_mach_o_read_fvmlib, bfd_mach_o_read_str): ..in these functions.
  3365. * peicode.h (pe_bfd_object_p): Don't zero the part of opthdr
  3366. being read from file, just the extra.
  3367. * som.c (som_slurp_symbol_table): Allocate internal symbol buffer
  3368. after reading external syms. Free on failure.
  3369. 2020-02-19 Alan Modra <amodra@gmail.com>
  3370. * coffcode.h (buy_and_read, coff_slurp_line_table),
  3371. (coff_slurp_symbol_table, coff_slurp_reloc_table): Replace
  3372. bfd_[z][m]alloc2 calls with _bfd_mul_overflow followed by the
  3373. corresponding bfd_alloc call. Adjust variables to suit.
  3374. * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
  3375. * ecoff.c (_bfd_ecoff_slurp_symbolic_info),
  3376. (_bfd_ecoff_slurp_symbol_table, READ): Likewise.
  3377. * elf.c (bfd_elf_get_elf_syms, setup_group, bfd_section_from_shdr),
  3378. (swap_out_syms, _bfd_elf_slurp_version_tables): Likewise.
  3379. * elf32-m32c.c (m32c_elf_relax_section): Likewise.
  3380. * elf32-rl78.c (rl78_elf_relax_section): Likewise.
  3381. * elf32-rx.c (elf32_rx_relax_section): Likewise.
  3382. * elf64-alpha.c (READ): Likewise.
  3383. * elfcode.h (elf_object_p, elf_write_relocs, elf_write_shdrs_and_ehdr),
  3384. (elf_slurp_symbol_table, elf_slurp_reloc_table),
  3385. (bfd_from_remote_memory): Likewise.
  3386. * elfcore.h (core_find_build_id): Likewise.
  3387. * elfxx-mips.c (READ): Likewise.
  3388. * mach-o.c (bfd_mach_o_mangle_sections),
  3389. (bfd_mach_o_read_symtab_symbols, bfd_mach_o_read_thread),
  3390. (bfd_mach_o_read_dysymtab, bfd_mach_o_flatten_sections),
  3391. (bfd_mach_o_scan, bfd_mach_o_fat_archive_p): Likewise.
  3392. * som.c (setup_sections, som_prep_for_fixups)
  3393. (som_build_and_write_symbol_table, som_slurp_symbol_table),
  3394. (som_slurp_reloc_table, som_bfd_count_ar_symbols),
  3395. (som_bfd_fill_in_ar_symbols, som_slurp_armap),
  3396. (som_bfd_ar_write_symbol_stuff): Likewise.
  3397. * vms-alpha.c (vector_grow1): Likewise.
  3398. * vms-lib.c (vms_add_index): Likewise.
  3399. * wasm-module.c (wasm_scan_name_function_section): Likewise.
  3400. * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): Delete.
  3401. * opncls.c (bfd_alloc2, bfd_zalloc2): Delete.
  3402. * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2),
  3403. (bfd_alloc2, bfd_zalloc2): Delete.
  3404. (_bfd_mul_overflow): Define.
  3405. * libbfd.h: Regenerate.
  3406. 2020-02-19 Alan Modra <amodra@gmail.com>
  3407. * elf.c (bfd_section_from_shdr): Use bfd_zalloc rather than
  3408. bfd_zalloc2.
  3409. (assign_section_numbers): Likewise.
  3410. (elf_map_symbols): Likewise, and bfd_alloc rather than bfd_alloc2.
  3411. (_bfd_elf_map_sections_to_segments): Use bfd_malloc rather than
  3412. bfd_malloc2, size_t amt, and unsigned tls_count.
  3413. (rewrite_elf_program_header): Use bfd_malloc and size_t amt.
  3414. * elflink.c (elf_create_symbuf): Use bfd_malloc.
  3415. (elf_output_implib): Use bfd_alloc.
  3416. 2020-02-19 Alan Modra <amodra@gmail.com>
  3417. * bfd.c (struct bfd): Move format and direction to other
  3418. bitfields. Add "size".
  3419. * bfdio.c (bfd_get_size): Cache size when not writing file.
  3420. * opncls.c (bfd_get_debug_link_info_1): Allow for bfd_get_size
  3421. returning zero, ie. unknown.
  3422. (bfd_get_alt_debug_link_info): Likewise.
  3423. * bfd-in2.h: Regenerate.
  3424. 2020-02-19 Alan Modra <amodra@gmail.com>
  3425. * coffgen.c (_bfd_coff_get_external_symbols): Don't call
  3426. bfd_get_file_size twice.
  3427. (_bfd_coff_read_string_table): Allow for bfd_get_file_size
  3428. zero, ie. unknown, return.
  3429. * elf-attrs.c (_bfd_elf_parse_attributes): Likewise.
  3430. * elfcode.h (elf_swap_shdr_in): Likewise.
  3431. (elf_object_p): Don't call bfd_get_file_size twice and correct
  3432. file size check.
  3433. 2020-02-19 Alan Modra <amodra@gmail.com>
  3434. * mach-o.c (bfd_mach_o_flatten_sections): Return a bfd_boolean,
  3435. FALSE if memory alloc fails. Adjust calls.
  3436. * som.c (som_prep_for_fixups): Likewise.
  3437. * vms-alpha.c (alpha_vms_add_fixup_lp, alpha_vms_add_fixup_ca),
  3438. (alpha_vms_add_fixup_qr, alpha_vms_add_fixup_lr),
  3439. (alpha_vms_add_lw_reloc, alpha_vms_add_qw_reloc): Likewise.
  3440. * som.c (som_build_and_write_symbol_table): Return via error_return
  3441. on seek failure.
  3442. * vms-alpha.c (VEC_APPEND): Adjust for vector_grow1 changes.
  3443. (VEC_APPEND_EL): Delete.
  3444. (vector_grow1): Return pointer to element. Catch overflow.
  3445. Return NULL on memory allocation failure.
  3446. (alpha_vms_add_fixup_lp): Replace VEC_APPEND_EL with VEC_APPEND.
  3447. (alpha_vms_add_fixup_ca): Likewise.
  3448. (alpha_vms_link_add_object_symbols): Check VEC_APPEND result
  3449. before using.
  3450. * elf.c (bfd_section_from_shdr): Check bfd_zalloc2 result.
  3451. 2020-02-19 Alan Modra <amodra@gmail.com>
  3452. * aix386-core.c (aix386_core_file_p): Use size_t for "amt".
  3453. * aout-target.h (object_p): Likewise.
  3454. * aout-tic30.c (tic30_aout_object_p): Likewise.
  3455. * aoutx.h (some_aout_object_p, mkobject, make_empty_symbol),
  3456. (emit_stringtab, write_syms, link_hash_table_create),
  3457. (aout_link_write_other_symbol): Likewise.
  3458. * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p),
  3459. (bfd_ar_hdr_from_filesystem, _bfd_write_archive_contents),
  3460. (_bfd_compute_and_write_armap): Likewise.
  3461. * archures.c (bfd_arch_list): Likewise.
  3462. * bfd.c (bfd_record_phdr): Likewise.
  3463. * binary.c (binary_canonicalize_symtab): Likewise.
  3464. * cisco-core.c (cisco_core_file_validate): Likewise.
  3465. * coff-arm.c (coff_arm_link_hash_table_create, find_thumb_glue),
  3466. (find_arm_glue, record_arm_to_thumb_glue),
  3467. (record_thumb_to_arm_glue): Likewise.
  3468. * coff-ppc.c (ppc_coff_link_hash_table_create, record_toc),
  3469. (ppc_allocate_toc_section): Likewise.
  3470. * coff-rs6000.c (_bfd_xcoff_mkobject, _bfd_xcoff_archive_p): Likewise.
  3471. * coff-sh.c (sh_relax_section): Likewise.
  3472. * coff64-rs6000.c (xcoff64_archive_p): Likewise.
  3473. * coffcode.h (handle_COMDAT, coff_new_section_hook),
  3474. (coff_set_alignment_hook, coff_mkobject),
  3475. (coff_compute_section_file_positions): Likewise.
  3476. * coffgen.c (coff_make_empty_symbol, coff_bfd_make_debug_symbol),
  3477. (coff_find_nearest_line_with_names),
  3478. ( bfd_coff_set_symbol_class): Likewise.
  3479. * cofflink.c (_bfd_coff_link_hash_table_create),
  3480. (_bfd_coff_link_input_bfd): Likewise.
  3481. * dwarf1.c (alloc_dwarf1_unit, alloc_dwarf1_func): Likewise.
  3482. * dwarf2.c (read_abbrevs, read_attribute_value, add_line_info),
  3483. (build_line_info_table, sort_line_sequences),
  3484. (line_info_add_include_dir, line_info_add_file_name),
  3485. (decode_line_info, scan_unit_for_symbols, parse_comp_unit),
  3486. (place_sections, _bfd_dwarf2_slurp_debug_info): Likewise.
  3487. * ecoff.c (_bfd_ecoff_mkobject, _bfd_ecoff_make_empty_symbol),
  3488. (_bfd_ecoff_find_nearest_line),
  3489. (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
  3490. * ecofflink.c (bfd_ecoff_debug_init): Likewise.
  3491. * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Likewise.
  3492. * elf-m10300.c (mn10300_elf_relax_section),
  3493. (elf32_mn10300_link_hash_table_create): Likewise.
  3494. * elf-strtab.c (_bfd_elf_strtab_init): Likewise.
  3495. * elf.c (make_mapping, copy_elf_program_header): Likewise.
  3496. * elf32-arm.c (elf32_arm_link_hash_table_create),
  3497. (elf32_arm_setup_section_lists, elf32_arm_check_relocs),
  3498. (elf32_arm_new_section_hook): Likewise.
  3499. * elf32-avr.c (elf_avr_new_section_hook),
  3500. (elf32_avr_link_hash_table_create, get_local_syms),
  3501. (elf32_avr_setup_section_lists): Likewise.
  3502. * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create),
  3503. (bfin_link_hash_table_create): Likewise.
  3504. * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise.
  3505. * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
  3506. * elf32-csky.c (csky_elf_link_hash_table_create),
  3507. (csky_elf_check_relocs, elf32_csky_setup_section_lists): Likewise.
  3508. * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise.
  3509. * elf32-hppa.c (elf32_hppa_link_hash_table_create),
  3510. (elf32_hppa_setup_section_lists, get_local_syms): Likewise.
  3511. * elf32-i386.c (elf_i386_check_relocs): Likewise.
  3512. * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise.
  3513. * elf32-m32r.c (m32r_elf_link_hash_table_create),
  3514. (m32r_elf_check_relocs): Likewise.
  3515. * elf32-m68hc1x.c (m68hc11_elf_hash_table_create),
  3516. (elf32_m68hc11_setup_section_lists),
  3517. (elf32_m68hc11_size_stubs): Likewise.
  3518. * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
  3519. * elf32-metag.c (elf_metag_link_hash_table_create),
  3520. (elf_metag_setup_section_lists): Likewise.
  3521. * elf32-microblaze.c (microblaze_elf_link_hash_table_create),
  3522. (microblaze_elf_check_relocs): Likewise.
  3523. * elf32-nds32.c (nds32_elf_link_hash_table_create),
  3524. (nds32_elf_check_relocs): Likewise.
  3525. * elf32-nios2.c (nios2_elf32_setup_section_lists),
  3526. (get_local_syms, nios2_elf32_check_relocs),
  3527. (nios2_elf32_link_hash_table_create): Likewise.
  3528. * elf32-or1k.c (or1k_elf_link_hash_table_create),
  3529. (or1k_elf_check_relocs): Likewise.
  3530. * elf32-ppc.c (ppc_elf_modify_segment_map, update_plt_info): Likewise.
  3531. * elf32-pru.c (pru_elf32_link_hash_table_create): Likewise.
  3532. * elf32-s390.c (elf_s390_link_hash_table_create),
  3533. (elf_s390_check_relocs): Likewise.
  3534. * elf32-score.c (score_elf_create_got_section),
  3535. (s3_elf32_score_new_section_hook),
  3536. (elf32_score_link_hash_table_create): Likewise.
  3537. * elf32-score7.c (score_elf_create_got_section),
  3538. (s7_elf32_score_new_section_hook): Likewise.
  3539. * elf32-sh.c (sh_elf_link_hash_table_create),
  3540. (sh_elf_check_relocs): Likewise.
  3541. * elf32-tic6x.c (elf32_tic6x_link_hash_table_create),
  3542. (elf32_tic6x_new_section_hook, elf32_tic6x_check_relocs): Likewise.
  3543. * elf32-tilepro.c (tilepro_elf_link_hash_table_create),
  3544. (tilepro_elf_check_relocs): Likewise.
  3545. * elf32-v850.c (remember_hi16s_reloc): Likewise.
  3546. * elf32-vax.c (elf_vax_link_hash_table_create): Likewise.
  3547. * elf32-xtensa.c (elf_xtensa_link_hash_table_create),
  3548. (elf_xtensa_new_section_hook): Likewise.
  3549. * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create),
  3550. (get_got_entry, elf64_alpha_check_relocs): Likewise.
  3551. * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise.
  3552. * elf64-ia64-vms.c (elf64_ia64_object_p): Likewise.
  3553. * elf64-mmix.c (mmix_elf_new_section_hook): Likewise.
  3554. * elf64-ppc.c (ppc64_elf_new_section_hook),
  3555. (ppc64_elf_link_hash_table_create, update_local_sym_info),
  3556. (update_plt_info, ppc64_elf_check_relocs): Likewise.
  3557. * elf64-s390.c (elf_s390_link_hash_table_create),
  3558. (elf_s390_check_relocs): Likewise.
  3559. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
  3560. * elflink.c (bfd_elf_link_record_local_dynamic_symbol),
  3561. (_bfd_elf_link_find_version_dependencies, elf_link_add_object_symbols),
  3562. (elf_link_add_archive_symbols, compute_bucket_count),
  3563. (bfd_elf_size_dynsym_hash_dynstr, _bfd_elf_link_hash_table_create),
  3564. (bfd_elf_get_bfd_needed_list, elf_link_swap_symbols_out),
  3565. (bfd_elf_final_link): Likewise.
  3566. * elfnn-aarch64.c (elfNN_aarch64_link_hash_table_create),
  3567. (elfNN_aarch64_setup_section_lists, elfNN_aarch64_check_relocs),
  3568. (elfNN_aarch64_new_section_hook): Likewise.
  3569. * elfnn-ia64.c (elfNN_ia64_object_p): Likewise.
  3570. * elfnn-riscv.c (riscv_elf_link_hash_table_create),
  3571. (riscv_elf_check_relocs): Likewise.
  3572. * elfxx-mips.c (_bfd_mips_elf_new_section_hook),
  3573. (_bfd_mips_elf_add_symbol_hook, _bfd_mips_elf_check_relocs),
  3574. (_bfd_mips_elf_modify_segment_map, _bfd_mips_elf_set_section_contents),
  3575. (_bfd_mips_elf_link_hash_table_create): Likewise.
  3576. * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create),
  3577. (_bfd_sparc_elf_check_relocs),
  3578. (_bfd_sparc_elf_new_section_hook): Likewise.
  3579. * elfxx-tilegx.c (tilegx_elf_link_hash_table_create),
  3580. (tilegx_elf_check_relocs): Likewise.
  3581. * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise.
  3582. * format.c (bfd_check_format_matches): Likewise.
  3583. * hash.c (_bfd_stringtab_init): Likewise.
  3584. * ihex.c (ihex_scan): Likewise.
  3585. * irix-core.c (irix_core_core_file_p): Likewise.
  3586. * linker.c (bfd_wrapped_link_hash_lookup),
  3587. (_bfd_generic_link_hash_table_create),
  3588. (_bfd_generic_reloc_link_order): Likewise.
  3589. * lynx-core.c (lynx_core_file_p): Likewise.
  3590. * netbsd-core.c (netbsd_core_file_p): Likewise.
  3591. * osf-core.c (osf_core_core_file_p): Likewise.
  3592. * pdp11.c (some_aout_object_p, mkobject, make_empty_symbol),
  3593. (link_hash_table_create, aout_link_write_other_symbol): Likewise.
  3594. * peXXigen.c (_bfd_XX_bfd_copy_private_section_data): Likewise.
  3595. * peicode.h (pe_mkobject): Likewise.
  3596. * ppcboot.c (ppcboot_mkobject, ppcboot_canonicalize_symtab): Likewise.
  3597. * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
  3598. * sco5-core.c (read_uarea): Likewise.
  3599. * som.c (hppa_som_gen_reloc_type, som_object_p, som_prep_headers),
  3600. (som_write_fixups, som_write_space_strings, som_write_symbol_strings),
  3601. (som_finish_writing, som_canonicalize_symtab, som_new_section_hook),
  3602. (som_bfd_copy_private_section_data, bfd_som_set_section_attributes),
  3603. (bfd_som_attach_aux_hdr, som_write_armap): Likewise.
  3604. * srec.c (srec_scan): Likewise.
  3605. * syms.c (_bfd_generic_make_empty_symbol): Likewise.
  3606. * targets.c (bfd_target_list): Likewise.
  3607. * tekhex.c (first_phase, tekhex_sizeof_headers): Likewise.
  3608. * trad-core.c (trad_unix_core_file_p): Likewise.
  3609. * vms-alpha.c (vms_initialize, alpha_vms_bfd_link_hash_table_create),
  3610. (vms_new_section_hook): Likewise.
  3611. * wasm-module.c (wasm_make_empty_symbol): Likewise.
  3612. * xcofflink.c (xcoff_get_section_contents),
  3613. (_bfd_xcoff_bfd_link_hash_table_create, xcoff_set_import_path),
  3614. (xcoff_find_function, bfd_xcoff_link_record_set, xcoff_build_ldsym),
  3615. (bfd_xcoff_size_dynamic_sections, xcoff_link_input_bfd): Likewise.
  3616. 2020-02-19 Alan Modra <amodra@gmail.com>
  3617. * elfxx-riscv.c (riscv_multi_letter_ext_valid_p): Don't use C99.
  3618. 2020-02-13 H.J. Lu <hongjiu.lu@intel.com>
  3619. * plugin.c (try_load_plugin): Make plugin_list_iter an argument
  3620. and use it if it isn't NULL. Remove has_plugin_p argument. Add
  3621. a build_list_p argument. Don't search plugin_list. Short circuit
  3622. when building the plugin list.
  3623. (has_plugin): Renamed to has_plugin_list.
  3624. (bfd_plugin_set_plugin): Don't set has_plugin.
  3625. (bfd_plugin_specified_p): Check plugin_list instead.
  3626. (build_plugin_list): New function.
  3627. (load_plugin): Call build_plugin_list and use plugin_list.
  3628. 2020-02-11 H.J. Lu <hongjiu.lu@intel.com>
  3629. PR binutils/25355
  3630. * plugin.c (try_claim): Always clean up for LTO wrapper.
  3631. (try_load_plugin): Treat each object as independent. Create a
  3632. copy for plugin name.
  3633. 2020-02-11 Nick Clifton <nickc@redhat.com>
  3634. * elf32-msp430.c (msp430_final_link_relocate): Always use longs
  3635. for addresses in print statements.
  3636. (msp430_elf_relax_delete_bytes): Likewise.
  3637. (msp430_elf_relax_add_words): Likewise.
  3638. (msp430_elf_relax_section): Likewise.
  3639. 2020-02-11 H.J. Lu <hongjiu.lu@intel.com>
  3640. * plugin.c (add_symbols): Clear plugin_data memory.
  3641. 2020-02-10 H.J. Lu <hongjiu.lu@intel.com>
  3642. PR binutils/25355
  3643. * configure.ac (HAVE_EXECUTABLE_SUFFIX): New AC_DEFINE.
  3644. (EXECUTABLE_SUFFIX): Likewise.
  3645. * config.in: Regenerated.
  3646. * configure: Likewise.
  3647. * plugin.c (bfd_plugin_close_and_cleanup): Removed.
  3648. (plugin_list_entry): Add all_symbols_read, cleanup_handler,
  3649. gcc, lto_wrapper, resolution_file, resolution_option, gcc_env,
  3650. real_bfd, real_nsyms, real_syms, lto_nsyms and lto_syms.
  3651. (get_lto_wrapper): New.
  3652. (setup_lto_wrapper_env): Likewise.
  3653. (current_plugin): Likewise.
  3654. (register_all_symbols_read): Likewise.
  3655. (register_cleanup): Likewise.
  3656. (get_symbols): Likewise.
  3657. (add_input_file): Likewise.
  3658. (bfd_plugin_close_and_cleanup): Likewise.
  3659. (claim_file): Removed.
  3660. (register_claim_file): Set current_plugin->claim_file.
  3661. (add_symbols): Make a copy of LTO symbols. Set lto_nsyms and
  3662. lto_syms in current_plugin.
  3663. (try_claim): Use current_plugin->claim_file. Call LTO plugin
  3664. all_symbols_read handler. Copy real symbols to plugin_data.
  3665. Call LTO plugin cleanup handler. Clean up for LTO wrapper.
  3666. (try_load_plugin): Don't reuse the previous plugin for LTO
  3667. wrapper. Set up GCC LTO wrapper if possible. Don't set
  3668. plugin_list_iter->claim_file.
  3669. (bfd_plugin_canonicalize_symtab): Use real LTO symbols if
  3670. possible.
  3671. * plugin.h (plugin_data_struct): Add real_bfd, real_nsyms and
  3672. real_syms.
  3673. 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
  3674. * elf32-msp430.c (msp430_elf_relax_section): Before relaxing a branch,
  3675. check if previous instruction matches a conditional jump inserted
  3676. earlier. Invert conditional jump and delete branch in this case.
  3677. 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
  3678. * elf32-msp430.c (msp430_elf_relax_add_two_words): Rename to
  3679. msp430_elf_relax_add_words. Support insertion of either one or two
  3680. words.
  3681. (msp430_elf_relax_section): Catch opcode of 0x3c00 when relocation
  3682. needs to be grown. Handle insertion of branch instruction to replace
  3683. jump.
  3684. 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
  3685. * elf32-msp430.c (msp430_final_link_relocate): Add printf statements for
  3686. debugging relocations.
  3687. (msp430_elf_relax_delete_bytes): Likewise.
  3688. (msp430_elf_relax_add_two_words): Likewise.
  3689. (msp430_elf_relax_section): Likewise.
  3690. 2020-02-10 Alan Modra <amodra@gmail.com>
  3691. * archures.c: Wrap overlong z80 comments.
  3692. * bfd-in2.h: Regenerate.
  3693. 2020-02-07 Sergey Belyashov <sergey.belyashov@gmail.com>
  3694. PR 25469
  3695. * archures.c: Add GBZ80 and Z80N machine values.
  3696. * reloc.c: Add BFD_RELOC_Z80_16_BE.
  3697. * coff-z80.c: Add support for new reloc.
  3698. * coffcode.h: Add support for new machine values.
  3699. * cpu-z80.c: Add support for new machine names.
  3700. * elf32-z80.c: Add support for new reloc.
  3701. * bfd-in2.h: Regenerate.
  3702. * libbfd.h: Regenerate.
  3703. 2020-02-07 Nick Clifton <nickc@redhat.com>
  3704. PR 23932
  3705. * elf.c (rewrite_elf_program_header): Do not complain if no
  3706. sections are mapped to a segment.
  3707. 2020-02-06 H.J. Lu <hongjiu.lu@intel.com>
  3708. PR ld/25490
  3709. * elflink.c (_bfd_elf_gc_mark_extra_sections): Issue an error
  3710. for garbage collection on __patchable_function_entries section
  3711. without linked-to section.
  3712. 2020-02-06 H.J. Lu <hongjiu.lu@intel.com>
  3713. PR gas/25381
  3714. * bfd-in2.h: Regenerated.
  3715. * elflink.c (_bfd_elf_gc_mark_extra_sections): Call mark_hook
  3716. on section if gc_mark of any of its linked-to sections is set
  3717. and don't set gc_mark again.
  3718. * section.c (asection): Add linked_to_symbol_name to map_head
  3719. union.
  3720. 2020-02-06 Maciej W. Rozycki <macro@wdc.com>
  3721. * elf32-v850.c (v850_elf_relax_section): Fix the index used for
  3722. reporting an unrecognized instruction with R_V850_LONGJUMP.
  3723. 2020-02-05 Alan Modra <amodra@gmail.com>
  3724. * elf64-ppc.c (ppc_stub_plt_branch): Match comment with reality.
  3725. 2020-02-04 Alan Modra <amodra@gmail.com>
  3726. * elf32-ppc.c (ppc_elf_relocate_section): After applying
  3727. R_PPC_VLE_ADDR20, goto copy_reloc.
  3728. 2020-02-02 H.J. Lu <hongjiu.lu@intel.com>
  3729. * bfd-in2.h: Regenerated.
  3730. * section.c (SEC_ASSEMBLER_SECTION_ID): Fix a typo in comments.
  3731. 2020-02-02 H.J. Lu <hongjiu.lu@intel.com>
  3732. PR gas/25380
  3733. * bfd-in2.h: Regenerated.
  3734. * ecoff.c (bfd_debug_section): Add section_id.
  3735. * section.c (bfd_section): Add section_id.
  3736. (SEC_ASSEMBLER_SECTION_ID): New.
  3737. (BFD_FAKE_SECTION): Add section_id.
  3738. 2020-02-01 Nick Clifton <nickc@redhat.com>
  3739. * config.bfd: Move the c30-aout and tic30-aout targets onto the
  3740. obsolete list.
  3741. 2020-01-31 Sandra Loosemore <sandra@codesourcery.com>
  3742. * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): DW_EH_PE_datarel
  3743. encodings are relative to the GOT on nios2, too.
  3744. 2020-01-31 Alan Modra <amodra@gmail.com>
  3745. * Makefile.am (elf32-target.h, elf64-target.h): Don't use a temp
  3746. file. Use $< and $@ in rules.
  3747. (elf32-aarch64.c, elf64-aarch64.c): Likewise.
  3748. (elf32-ia64.c, elf64-ia64.c): Likewise.
  3749. (elf32-riscv.c, elf64-riscv.c): Likewise.
  3750. (peigen.c, pepigen.c, pex64igen.c): Likewise.
  3751. (elf32-aarch64.c, elf64-aarch64.c): Don't emit $srcdir on #line.
  3752. (elf32-riscv.c, elf64-riscv.c): Likewise, and use $(SED).
  3753. (elf32-ia64.c, elf64-ia64.c): Do emit #line.
  3754. (peigen.c, pepigen.c, pex64igen.c): Likewise.
  3755. * Makefile.in: Regenerate.
  3756. 2020-01-31 Alan Modra <amodra@gmail.com>
  3757. PR 4110
  3758. * elf.c (setup_group): Don't clear entire section contents,
  3759. just the padding after group flags. Release alloc'd memory
  3760. after a seek or read failure.
  3761. 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
  3762. * peXXigen.c (pe_is_repro): New function.
  3763. (_bfd_XX_print_private_bfd_data_common): Note timestamp is
  3764. actually a build hash if PE_IMAGE_DEBUG_TYPE_REPRO is present.
  3765. 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
  3766. * peXXigen.c (debug_type_names): Add names for new debug data type
  3767. values.
  3768. 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
  3769. * peXXigen.c (pe_print_debugdata): Fix the iteration variable for
  3770. inner loop. Fix a memory leak.
  3771. 2020-01-30 Alan Modra <amodra@gmail.com>
  3772. * coffgen.c (coff_real_object_p): Don't clear obj_coff_keep_syms
  3773. or obj_coff_keep_strings here.
  3774. (coff_get_normalized_symtab): Free external syms directly.
  3775. * xcofflink.c (xcoff_link_input_bfd): Restore obj_coff_keep_syms
  3776. on error exit path.
  3777. 2020-01-27 Jim Wilson <jimw@sifive.com>
  3778. * cpu-riscv.c (riscv_scan): New.
  3779. (N): Change bfd_default_scan to riscv_scan.
  3780. 2020-01-27 Andreas Schwab <schwab@suse.de>
  3781. * Makefile.am (ALL_MACHINES): Remove cpu-plugin.lo.
  3782. (ALL_MACHINES_CFILES): Remove cpu-plugin.c.
  3783. * Makefile.in: Regenerate.
  3784. * cpu-plugin.c: Remove.
  3785. * archures.c (enum bfd_architecture): Remove bfd_arch_plugin.
  3786. (bfd_plugin_arch): Remove declaration.
  3787. * bfd-in2.h: Regenerate.
  3788. * po/SRC-POTFILES.in: Regenerate.
  3789. 2020-01-27 H.J. Lu <hongjiu.lu@intel.com>
  3790. Alan Modra <amodra@gmail.com>
  3791. PR ld/25458
  3792. * elflink.c (_bfd_elf_gc_mark_rsec): Mark all weak aliases.
  3793. 2020-01-24 Jim Wilson <jimw@sifive.com>
  3794. * elfxx-riscv.c (riscv_get_prefix_class): Format s case like others.
  3795. (riscv_parse_prefixed_ext): Fix s extension comment and reword to
  3796. avoid over long line.
  3797. 2020-01-24 Nick Clifton <nickc@redhat.com>
  3798. PR 25447
  3799. * coffgen.c (_bfd_coff_close_and_cleanup): Do not clear the keep
  3800. syms and keep strings flags as these may have been set in order to
  3801. prevent a bogus call to free.
  3802. 2020-01-23 Nick Clifton <nickc@redhat.com>
  3803. * po/fr.po: Updated French translation.
  3804. 2020-01-23 Alan Modra <amodra@gmail.com>
  3805. PR 25444
  3806. * elf.c (assign_file_positions_for_load_sections): Avoid divide
  3807. by zero when p_align is zero.
  3808. 2020-01-22 Maxim Blinov <maxim.blinov@embecosm.com>
  3809. * bfd/elfnn-riscv.c (riscv_skip_prefix): New.
  3810. (riscv_prefix_cmp): Likewise.
  3811. (riscv_non_std_ext_p): Deleted.
  3812. (riscv_std_sv_ext_p): Likewise.
  3813. (riscv_non_std_sv_ext_p): Likewise.
  3814. (riscv_merge_non_std_and_sv_ext): Rename to...
  3815. (riscv_merge_multi_letter_ext): and modified to use riscv_prefix_cmp.
  3816. (riscv_merge_arch_attr_info): Replace 3 calls to
  3817. riscv_merge_non_std_and_sv_ext with single call to
  3818. riscv_merge_multi_letter_ext.
  3819. * bfd/elfxx-riscv.c (riscv_parse_std_ext): Break if we
  3820. encounter a 'z' prefix.
  3821. (riscv_get_prefix_class): New function, return prefix class based
  3822. on first few characters of input string.
  3823. (riscv_parse_config): New structure to factor out minor differences
  3824. in extension class parsing behaviour.
  3825. (riscv_parse_sv_or_non_std_ext): Rename to...
  3826. (riscv_parse_prefixed_ext): and parameterise with
  3827. riscv_parse_config.
  3828. (riscv_std_z_ext_strtab, riscv_std_s_ext_strtab): New.
  3829. (riscv_multi_letter_ext_valid_p): New.
  3830. (riscv_ext_x_valid_p, riscv_ext_z_valid_p, riscv_ext_s_valid_p): New.
  3831. (riscv_parse_subset): Delegate all non-single-letter parsing work
  3832. to riscv_parse_prefixed_ext.
  3833. * bfd/elfxx-riscv.h (riscv_isa_ext_class): New type.
  3834. (riscv_get_prefix_class): Declare.
  3835. 2020-01-22 Alan Modra <amodra@gmail.com>
  3836. * elf64-ppc.c (struct ppc_link_hash_table): Add tga_group.
  3837. (ppc64_elf_archive_symbol_lookup): Extract __tls_get_addr_opt for
  3838. __tls_get_addr_desc.
  3839. (ppc64_elf_size_stubs): Add section for linker generated
  3840. __tls_get_addr_desc wrapper function. Loop at least once if
  3841. generating this function.
  3842. (emit_tga_desc, emit_tga_desc_eh_frame): New functions.
  3843. (ppc64_elf_build_stubs): Generate __tls_get_addr_desc.
  3844. 2020-01-22 Alan Modra <amodra@gmail.com>
  3845. * elf64-ppc.h (struct ppc64_elf_params): Add no_tls_get_addr_regsave.
  3846. * elf64-ppc.c (struct ppc_link_hash_table): Add tga_desc and
  3847. tga_desc_fd.
  3848. (is_tls_get_addr): Match tga_desc and tga_desc_df too.
  3849. (STDU_R1_0R1, ADDI_R1_R1): Define.
  3850. (tls_get_addr_prologue, tls_get_addr_epilogue): New functions.
  3851. (ppc64_elf_tls_setup): Set up tga_desc and tga_desc_fd. Indirect
  3852. tga_desc_fd to opt_fd, and tga_desc to opt. Set
  3853. no_tls_get_addr_regsave.
  3854. (branch_reloc_hash_match): Add hash3 and hash4.
  3855. (ppc64_elf_tls_optimize): Handle tga_desc_fd and tga_desc too.
  3856. (ppc64_elf_size_dynamic_sections): Likewise.
  3857. (ppc64_elf_relocate_section): Likewise.
  3858. (plt_stub_size, build_plt_stub): Likewise. Size regsave
  3859. __tls_get_addr stub.
  3860. (build_tls_get_addr_stub): Build regsave __tls_get_addr stub and
  3861. eh_frame.
  3862. (ppc_size_one_stub): Handle tga_desc_fd and tga_desc too. Size
  3863. eh_frame for regsave __tls_get_addr.
  3864. 2020-01-22 Alan Modra <amodra@gmail.com>
  3865. * elf64-ppc.c (ppc64_elf_size_stubs): Correct condition under
  3866. which __tls_get_addr calls will be eliminated.
  3867. 2020-01-20 Nick Clifton <nickc@redhat.com>
  3868. * po/pt.po: Updates Portuguese translation.
  3869. * po/ru.po: Updated Russian translation.
  3870. * po/uk.po: Updated Ukranian translation.
  3871. 2020-01-20 H.J. Lu <hongjiu.lu@intel.com>
  3872. PR ld/25416
  3873. * elf64-x86-64.c (elf_x86_64_check_tls_transition): Support
  3874. "rex leal x@tlsdesc(%rip), %reg" and "call *x@tlsdesc(%eax)" in
  3875. X32 mode.
  3876. (elf_x86_64_relocate_section): In x32 mode, for GDesc -> LE
  3877. transition, relax "rex leal x@tlsdesc(%rip), %reg" to
  3878. "rex movl $x@tpoff, %reg", for GDesc -> IE transition, relax
  3879. "rex leal x@tlsdesc(%rip), %reg" to
  3880. "rex movl x@gottpoff(%rip), %eax". For both transitions, relax
  3881. "call *(%eax)" to "nopl (%rax)".
  3882. 2020-01-20 Alan Modra <amodra@gmail.com>
  3883. * elf64-ppc.c (LD_R11_0R3, CMPDI_R11_0, STD_R11_0R1, LD_R11_0R1),
  3884. (MTLR_R11): Don't define.
  3885. (LD_R0_0R3, CMPDI_R0_0): Define.
  3886. (build_tls_get_addr_stub): Don't use r11 in stub.
  3887. 2020-01-20 Alan Modra <amodra@gmail.com>
  3888. * elf64-ppc.c (ppc_elf_hash_entry): New function, use throughout file.
  3889. (defined_sym_val, is_tls_get_addr): Likewise.
  3890. 2020-01-18 Nick Clifton <nickc@redhat.com>
  3891. * version.m4 (BFD_VERSION): Set to 2.34.50.
  3892. * configure: Regenerate.
  3893. * po/bfd.pot: Regenerate.
  3894. 2020-01-18 Nick Clifton <nickc@redhat.com>
  3895. Binutils 2.34 branch created.
  3896. 2020-01-17 Christian Biesinger <cbiesinger@google.com>
  3897. * coff-arm.c: Fix spelling error (seperate).
  3898. * elfxx-riscv.c (riscv_parse_sv_or_non_std_ext): Fix spelling
  3899. error (seperate).
  3900. * sysdep.h (strnlen): Fix spelling error (seperate).
  3901. 2020-01-15 Lars Brinkhoff <lars@nocrew.org>
  3902. PR 20694
  3903. * pdp11.c (TARGET_PAGE_SIZE): Set to 8192.
  3904. 2020-01-15 Alan Modra <amodra@gmail.com>
  3905. PR 25384
  3906. * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Update comment.
  3907. (ppc64_elf_adjust_dynamic_symbol): Don't allow .dynbss copies
  3908. of function symbols unless dot symbols are present. Do warn
  3909. whenever one is created, regardles of whether a PLT entry is
  3910. also emitted for the function symbol.
  3911. 2020-01-14 Alan Modra <amodra@gmail.com>
  3912. * som.c (som_bfd_count_ar_symbols): Error when file position
  3913. of symbols on chains is not strictly increasing.
  3914. 2020-01-14 Alan Modra <amodra@gmail.com>
  3915. * vms.h (VMS_DEBUG): Define as 0.
  3916. * vms-alpha.c (image_write): Move debug output after bounds check.
  3917. Tidy bounds check.
  3918. (_bfd_vms_slurp_eihd): Warning fix.
  3919. (_bfd_vms_slurp_etir): Init variables to avoid bogus warnings.
  3920. 2020-01-13 Alan Modra <amodra@gmail.com>
  3921. * vms-alpha.c (_bfd_vms_slurp_egsd): Ensure minimum size even
  3922. for "ignored" records.
  3923. 2020-01-13 Alan Modra <amodra@gmail.com>
  3924. * wasm-module.c (wasm_scan_name_function_section): Formatting.
  3925. Delete asect name check. Move asect NULL check to wasm_object_p.
  3926. Correct bounds check of sizes against end. Replace uses of
  3927. bfd_zalloc with bfd_alloc, zeroing only necessary bytes. Use
  3928. just one bfd_release.
  3929. (wasm_scan): Don't use malloc/strdup for section names,
  3930. bfd_alloc instead. Simplify code prefixing section name.
  3931. Formatting. Don't attempt to free memory here..
  3932. (wasm_object_p): ..do so here.
  3933. 2020-01-10 Szabolcs Nagy <szabolcs.nagy@arm.com>
  3934. PR ld/22269
  3935. * elf32-arm.c (elf32_arm_final_link_relocate): Use
  3936. UNDEFWEAK_NO_DYNAMIC_RELOC.
  3937. (allocate_dynrelocs_for_symbol): Likewise.
  3938. 2020-01-10 Tamar Christina <tamar.christina@arm.com>
  3939. PR 25210
  3940. * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Remove elfclass.
  3941. 2020-01-10 Alan Modra <amodra@gmail.com>
  3942. * coff-alpha.c (alpha_ecoff_object_p): Calculate size in bfd_size_type.
  3943. 2020-01-09 Nick Clifton <nickc@redhat.com>
  3944. PR 25221
  3945. * bfd.c (bfd_convert_section_contents): Check for a compress
  3946. header size that is larger than the actual section size.
  3947. 2020-01-08 Alan Modra <amodra@gmail.com>
  3948. PR 25351
  3949. * elflink.c (bfd_elf_final_link): Call _bfd_fix_excluded_sec_syms
  3950. after removing sections.
  3951. 2020-01-06 Jim Wilson <jimw@sifive.com>
  3952. PR 25205
  3953. * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Add
  3954. check for !bfd_link_pic (info).
  3955. <R_RISCV_CALL_PLT>: Move next to R_RISCV_CALL.
  3956. <R_RISCV_JAL>: Add comment.
  3957. (_bfd_riscv_relax_section): For plt.offset check, add check for
  3958. bfd_link_pic (info). Add comment.
  3959. 2020-01-06 Alan Modra <amodra@gmail.com>
  3960. * format.c (bfd_check_format_matches): Ignore bfd_error on target
  3961. match failures. Don't init to bfd_error_wrong_format before
  3962. calling _bfd_check_format.
  3963. 2020-01-06 Alan Modra <amodra@gmail.com>
  3964. * vms-alpha.c (_bfd_vms_push, _bfd_vms_pop): Return pass/fail
  3965. status rather than exiting on stack overflow or underflow.
  3966. (_bfd_vms_slurp_etir): Adjust to suit.
  3967. 2020-01-06 Alan Modra <amodra@gmail.com>
  3968. * som.c (som_bfd_fill_in_ar_symbols): Bounds check som_dict index.
  3969. 2020-01-06 Alan Modra <amodra@gmail.com>
  3970. * mach-o.c (bfd_mach_o_read_dylinker): Don't read past end of
  3971. command. Check name offset is within command.
  3972. (bfd_mach_o_read_dylib, bfd_mach_o_read_prebound_dylib),
  3973. (bfd_mach_o_read_prebind_cksum, bfd_mach_o_read_twolevel_hints),
  3974. (bfd_mach_o_read_fvmlib, bfd_mach_o_read_dysymtab),
  3975. (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid),
  3976. (bfd_mach_o_read_linkedit, bfd_mach_o_read_str),
  3977. (bfd_mach_o_read_dyld_info, bfd_mach_o_read_version_min),
  3978. (bfd_mach_o_read_encryption_info, bfd_mach_o_read_source_version),
  3979. (bfd_mach_o_read_encryption_info_64, bfd_mach_o_read_main),
  3980. (bfd_mach_o_read_note, bfd_mach_o_read_build_version),
  3981. (bfd_mach_o_read_segment): Similarly.
  3982. (bfd_mach_o_read_thread): Properly bound check thread struct.
  3983. Don't repeat checks on second loop.
  3984. (bfd_mach_o_read_command): Fail on invalid command length.
  3985. 2020-01-04 Alan Modra <amodra@gmail.com>
  3986. * format.c (bfd_check_format_matches): Add preserve_match.
  3987. Save initial bfd state in "preserve", matched bfd state in
  3988. "preserve_match". Save just the first match. Release
  3989. bfd_alloc memory. Restore and finish preserved state as
  3990. appropriate on all function exit paths.
  3991. 2020-01-04 Alan Modra <amodra@gmail.com>
  3992. * mmo.c (mmo_mkobject): Allocate tdata with bfd_zalloc.
  3993. 2020-01-04 Alan Modra <amodra@gmail.com>
  3994. * coffgen.c (coff_real_object_p): Free malloc'd memory on target
  3995. match too.
  3996. 2020-01-03 Nick Clifton <nickc@redhat.com>
  3997. PR 25307
  3998. (bfd_pef_parse_function_stubs): Correct the test that ensures that
  3999. there is enough data remaining in the code buffer before
  4000. attempting to read a function stub.
  4001. 2020-01-03 Nick Clifton <nickc@redhat.com>
  4002. PR 25308
  4003. * elf-properties.c (_bfd_elf_convert_gnu_properties): Check the
  4004. return value from bfd_malloc.
  4005. * elf32-arm.c (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
  4006. (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Likewise.
  4007. (elf32_arm_filter_cmse_symbols): Likewise.
  4008. (elf32_arm_write_section): Likewise.
  4009. * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
  4010. (bfd_mach_o_follow_dsym): Likewise.
  4011. * pef.c (bfd_pef_print_loader_section): Likewise.
  4012. (bfd_pef_scan_start_address): Likewise.
  4013. (bfd_pef_parse_function_stubs): Likewise.
  4014. (bfd_pef_parse_symbols): Likewise.
  4015. 2020-01-03 Sergei Trofimovich <siarheit@google.com>
  4016. * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): don't fail
  4017. on binary inputs ld/PR25316.
  4018. (is_ia64_elf): new helper to filter on ia64 objects.
  4019. 2020-01-03 Jan Beulich <jbeulich@suse.com>
  4020. * mach-o.c (cpusubtype, bfd_mach_o_header_p): Insert underscore
  4021. in parameter names.
  4022. (bfd_mach_o_scan): Insert underscore in two variable names.
  4023. 2020-01-02 Sergey Belyashov <sergey.belyashov@gmail.com>
  4024. * Makefile.am: Add z80-elf target support.
  4025. * configure.ac: Likewise.
  4026. * targets.c: Likewise.
  4027. * Makefile.in: Regenerate.
  4028. * configure: Regenerate.
  4029. * config.bfd: Add z80-elf target support and new arches: ez80 and
  4030. z180.
  4031. * elf32-z80.c: New file.
  4032. * archures.c: Add new z80 architectures: eZ80 and Z180.
  4033. * coffcode.h: Likewise.
  4034. * cpu-z80.c: Likewise.
  4035. * coff-z80.c: Add new relocations for Z80 target and local label
  4036. check.
  4037. * reloc.c: Add new relocs.
  4038. * bfd-in2.h: Regenerate.
  4039. * libbfd.h: Regenerate.
  4040. 2020-01-02 Tamar Christina <tamar.christina@arm.com>
  4041. PR 25210
  4042. PR 24753
  4043. * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Set ELF class.
  4044. 2020-01-01 Alan Modra <amodra@gmail.com>
  4045. Update year range in copyright notice of all files.
  4046. For older changes see ChangeLog-2019
  4047. Copyright (C) 2020 Free Software Foundation, Inc.
  4048. Copying and distribution of this file, with or without modification,
  4049. are permitted in any medium without royalty provided the copyright
  4050. notice and this notice are preserved.
  4051. Local Variables:
  4052. mode: change-log
  4053. left-margin: 8
  4054. fill-column: 74
  4055. version-control: never
  4056. End: