public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-muller-windows-multi:  * Remove space before #endif
@ 2011-03-18 15:37 muller
  0 siblings, 0 replies; only message in thread
From: muller @ 2011-03-18 15:37 UTC (permalink / raw)
  To: archer-commits

The branch, archer-muller-windows-multi has been updated
       via  025e512f39fce1cb4323db83900d056ca646e38b (commit)
       via  e107c75e5bd3302ebd012590fdc02702bf4b0b10 (commit)
       via  3480b2bc56ec0bb51c1f18584fd293fd8ef25dec (commit)
       via  eb3e6936e0c1076e0b97e0bad55083503cf82d88 (commit)
       via  8cf9d7bc2daf04b1f2c826325a2dd45a12d34fe6 (commit)
       via  f240035c535706a46f27375e92907dea172d34ec (commit)
       via  59a9cd625a7a4e28ebca04e3c592b3f77c3a5948 (commit)
       via  7678cf17ece2148084514a258d3d71505d15ab79 (commit)
       via  9e2e8e2f9323fe17ceafb49d8eca9e3117947066 (commit)
       via  bb108bccb87a6e3b166a2ba74cc3aaf192c687ff (commit)
       via  1cb5481ade4ed3127e4a1c837809bed0341890f0 (commit)
       via  abf66c159a422b39b4e43b5bd76539ee6e3707a4 (commit)
       via  395670463fc6d90052fe345c4c09297192f71de2 (commit)
       via  d846e953e9c1955f38f58c1907a7ca04156ecd50 (commit)
       via  994eb44d6706f6fd03c26cf4ea53a3e59406da45 (commit)
       via  f8a14bb9b1a07a5b2ed498d53fc1f2b9e3877643 (commit)
       via  553322f596f0d94e47d54c185d3d58007dc5e3bc (commit)
       via  c695bf2d9e45077584c648925b2f213f40c87669 (commit)
       via  fb4c421cf68863046781cd9f70499b2c02c47fc0 (commit)
       via  3f7dcbfdae07840c89cd55e1a49348d1c6a187ea (commit)
       via  fe463b4c6e9c0a288ab586f84526b7a12f60806c (commit)
       via  2ee1ea9c534369870d4043bb3e8d4f81a594452d (commit)
       via  1c568374181fd7b1172561ce8d1a882d9fe0921c (commit)
       via  52c4c65117f334eaffd728d7652a66fc9c8ee763 (commit)
       via  7196c5630d1f71b9428ed1245dbb1fb4f7c4cbc1 (commit)
       via  894e4cb17dcec5279d6a634d4396194839aaa372 (commit)
       via  164fe3906c67abc7cd79f0f6840ba936be25c5c8 (commit)
       via  4f8d91f8d1fd48824ddb6bcfa99b56c19ce5ad15 (commit)
       via  460390c42916c9e4615c308a28571377408b0de6 (commit)
       via  42ca845af2fa8a1f179d962f8d6b6f1eb1f785de (commit)
       via  47f7bb8721a67744f6c986221fdcdb5daab55465 (commit)
       via  7913e35d72358f84d0d8e77bac6d2c21e3eb4621 (commit)
       via  83e6f766ec3a2aa165aaf173b6487d1e0107ca2c (commit)
       via  80c402fb208e60fcffd08e109f7af198b50aaa0f (commit)
       via  c61443c395556911f937205e2c84ded4bb88322c (commit)
       via  226a5ce35f72865c694f56064842a6d57ac41012 (commit)
       via  feaab51570a27b7db02de928a3fe9031259e8c6e (commit)
       via  29b21c5eceb36bf1ae27f5f577f778e3363605cc (commit)
       via  ca69ef3f8024128be3533d8e3cf8239492073f5a (commit)
       via  455c3aca4b6b03f634056d3a16c187fc6e8c09e8 (commit)
       via  e5f750ae15043bf77b43f97e671d5040727b62c9 (commit)
       via  41fdb83804a11830e523ed560848cc055b4c5d24 (commit)
       via  672e9778c4d126b3f1ea2f4887a9058b8247c53f (commit)
       via  047b8af30d3ee8ce5b3dd71614c890ed838c6d90 (commit)
       via  18d6612f9ede60d9005d376cf8863a79d6a4927d (commit)
       via  905780afb93a580aa026db6f175bfc35a368ebf7 (commit)
       via  57da298c38bfd8b645dc1c00d3ec4cd3f69771f8 (commit)
       via  033b423fc13651dbe731e940a75625f110b6f1af (commit)
       via  72110da1991252e2d5c932a4ab7e759bf217a840 (commit)
       via  4f7d3c58b92b745b134af53ab6f407eabf05ee09 (commit)
       via  2fcd95c2f73b1164222c883425bfaa9e2133e27b (commit)
       via  4e7c740caea25377077e2abac519b2218504a061 (commit)
       via  e7599069219ebd317796e0a9be4ffb9a99022c9d (commit)
       via  08a0cf0bb898103012c7f7e28614479ef718c467 (commit)
       via  7618068ba04d961d651a43a827e4a60a5a34f6ea (commit)
       via  53e61d086c25aed0625b1927ae8d48351b6d7a54 (commit)
       via  ba5bc1a44b71a09bc3f0e62db71364d186cfccd2 (commit)
       via  deb989899834b7e0e9e6911b5f25f60cfd46def3 (commit)
       via  b676ed482aa8b0010297535f542ea9bfd0118660 (commit)
       via  0ca05af73ed3e5aa9e1ca541d068c75a251aaa56 (commit)
       via  4dd51a525ac7a42f9773a24206ffb0fb0b286365 (commit)
       via  3435a0f49e351017f9034e78795d0337f832ac01 (commit)
      from  7b4c9a3ff05404f40c2145d5b89769022b994ccc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 025e512f39fce1cb4323db83900d056ca646e38b
Author: Pierre Muller <muller@ics.u-strasbg.fr>
Date:   Fri Mar 18 16:37:04 2011 +0100

     * Remove space before #endif

commit e107c75e5bd3302ebd012590fdc02702bf4b0b10
Merge: 7b4c9a3 3480b2b
Author: Pierre Muller <muller@ics.u-strasbg.fr>
Date:   Fri Mar 18 16:35:51 2011 +0100

    Merge remote-tracking branch 'origin/master' into archer-muller-windows-multi

-----------------------------------------------------------------------

Summary of changes:
 bfd/ChangeLog                                      |   98 ++
 bfd/bfd-in2.h                                      |    3 +
 bfd/elf32-arm.c                                    | 1593 ++++++++++++++------
 bfd/reloc.c                                        |    5 +
 bfd/version.h                                      |    2 +-
 gdb/ChangeLog                                      |  232 +++-
 gdb/MAINTAINERS                                    |    3 +-
 gdb/NEWS                                           |   23 +-
 gdb/ada-tasks.c                                    |   12 +-
 gdb/aix-thread.c                                   |    8 +-
 gdb/breakpoint.c                                   |   14 +
 gdb/cli/cli-utils.c                                |   11 +
 gdb/cli/cli-utils.h                                |    4 +
 gdb/coffread.c                                     |   24 +-
 gdb/common/windows-hdep.c                          |    2 +-
 gdb/config.in                                      |    4 +
 gdb/configure                                      |   16 +
 gdb/configure.ac                                   |    5 +
 gdb/darwin-nat.c                                   |    2 +-
 gdb/dbxread.c                                      |   29 +-
 gdb/dec-thread.c                                   |    2 +-
 gdb/dfp.c                                          |    2 +-
 gdb/doc/ChangeLog                                  |   19 +
 gdb/doc/gdb.texinfo                                |  119 ++-
 gdb/dwarf2read.c                                   |   88 +-
 gdb/event-top.c                                    |    2 +-
 gdb/exec.c                                         |    2 +-
 gdb/frame.c                                        |    2 +
 gdb/gdbserver/ChangeLog                            |   23 +
 gdb/gdbserver/hostio.c                             |    3 +-
 gdb/hppa-tdep.h                                    |    3 +-
 gdb/i386-darwin-nat.c                              |    2 +-
 gdb/infcall.c                                      |   16 +-
 gdb/inferior.h                                     |    3 +-
 gdb/linespec.c                                     |  196 ++-
 gdb/objc-exp.y                                     |   12 +-
 gdb/objc-lang.c                                    |    7 +
 gdb/osdata.c                                       |    2 +-
 gdb/p-exp.y                                        |   97 +-
 gdb/p-lang.c                                       |    6 +-
 gdb/p-valprint.c                                   |    6 +-
 gdb/ppc-sysv-tdep.c                                |   56 +-
 gdb/printcmd.c                                     |  148 +-
 gdb/psymtab.c                                      |   79 +-
 gdb/python/py-block.c                              |   48 +-
 gdb/python/py-breakpoint.c                         |  140 ++-
 gdb/python/py-inferior.c                           |   17 +
 gdb/python/py-infthread.c                          |   16 +
 gdb/python/py-objfile.c                            |   25 +-
 gdb/python/py-stopevent.h                          |    6 +-
 gdb/python/py-symbol.c                             |   24 +-
 gdb/python/py-symtab.c                             |   42 +-
 gdb/python/python.c                                |   18 +-
 gdb/python/python.h                                |    6 +
 gdb/record.c                                       |    2 +-
 gdb/remote-mips.c                                  |    2 +-
 gdb/remote.c                                       |    2 +-
 gdb/ser-mingw.c                                    |    2 +-
 gdb/solib-pa64.c                                   |    4 +-
 gdb/stabsread.c                                    |    6 +
 gdb/target.c                                       |   27 -
 gdb/target.h                                       |   12 -
 gdb/testsuite/ChangeLog                            |   61 +
 gdb/testsuite/gdb.arch/altivec-abi.exp             |   27 +-
 gdb/testsuite/gdb.base/Makefile.in                 |    3 +-
 .../gdb.base/break-on-linker-gcd-function.cc}      |   43 +-
 .../gdb.base/break-on-linker-gcd-function.exp      |   54 +
 gdb/testsuite/gdb.base/jit-main.c                  |   13 +
 .../gdb.cp/cmpd-minsyms.cc}                        |   44 +-
 gdb/testsuite/gdb.cp/cmpd-minsyms.exp              |   50 +
 gdb/testsuite/gdb.cp/ovsrch.exp                    |  100 ++
 .../py-stopevent.h => testsuite/gdb.cp/ovsrch.h}   |   46 +-
 .../py-stopevent.h => testsuite/gdb.cp/ovsrch1.cc} |   38 +-
 gdb/testsuite/gdb.cp/ovsrch2.cc                    |   28 +
 gdb/testsuite/gdb.cp/ovsrch3.cc                    |   28 +
 .../py-stopevent.h => testsuite/gdb.cp/ovsrch4.cc} |   31 +-
 gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.S      |   82 +
 gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp    |   40 +
 gdb/testsuite/gdb.dwarf2/pr11465.S                 |   17 +-
 gdb/testsuite/gdb.python/Makefile.in               |    2 +-
 gdb/testsuite/gdb.python/py-block.exp              |   17 +
 gdb/testsuite/gdb.python/py-breakpoint.exp         |   98 ++
 gdb/testsuite/gdb.python/py-inferior.exp           |   20 +
 gdb/testsuite/gdb.python/py-infthread.exp          |    7 +
 gdb/testsuite/gdb.python/py-objfile.c              |   23 +
 gdb/testsuite/gdb.python/py-objfile.exp            |   51 +
 gdb/testsuite/gdb.python/py-symbol.exp             |   16 +
 gdb/testsuite/gdb.python/py-symtab.exp             |    8 +
 gdb/testsuite/lib/gdb.exp                          |    5 +-
 gdb/tracepoint.c                                   |    4 +-
 gdb/varobj.c                                       |    5 +-
 gdb/varobj.h                                       |    4 +-
 gdb/version.in                                     |    2 +-
 gdb/windows-nat.c                                  |    2 +-
 include/ChangeLog                                  |    9 +
 include/dwarf2.h                                   |   23 +-
 include/elf/ChangeLog                              |    4 +
 include/elf/arm.h                                  |    2 +
 opcodes/ChangeLog                                  |    4 +
 opcodes/arm-dis.c                                  |    2 +-
 sim/bfin/ChangeLog                                 |   97 ++
 sim/bfin/Makefile.in                               |    4 +-
 sim/bfin/bfin-sim.c                                |  177 ++-
 sim/bfin/bfroms/bf50x-0.0.h                        |    3 +-
 sim/bfin/bfroms/bf51x-0.0.h                        |    3 +-
 sim/bfin/bfroms/bf51x-0.1.h                        |    3 +-
 sim/bfin/bfroms/bf51x-0.2.h                        |    3 +-
 sim/bfin/bfroms/bf526-0.0.h                        |    3 +-
 sim/bfin/bfroms/bf526-0.1.h                        |    3 +-
 sim/bfin/bfroms/bf527-0.0.h                        |    3 +-
 sim/bfin/bfroms/bf527-0.1.h                        |    3 +-
 sim/bfin/bfroms/bf527-0.2.h                        |    3 +-
 sim/bfin/bfroms/bf533-0.1.h                        |    3 +-
 sim/bfin/bfroms/bf533-0.2.h                        |    3 +-
 sim/bfin/bfroms/bf533-0.3.h                        |    3 +-
 sim/bfin/bfroms/bf537-0.0.h                        |    3 +-
 sim/bfin/bfroms/bf537-0.1.h                        |    3 +-
 sim/bfin/bfroms/bf537-0.3.h                        |    3 +-
 sim/bfin/bfroms/bf538-0.0.h                        |    3 +-
 sim/bfin/bfroms/bf54x-0.0.h                        |    3 +-
 sim/bfin/bfroms/bf54x-0.1.h                        |    3 +-
 sim/bfin/bfroms/bf54x-0.2.h                        |    3 +-
 sim/bfin/bfroms/bf54x_l1-0.0.h                     |    3 +-
 sim/bfin/bfroms/bf54x_l1-0.1.h                     |    3 +-
 sim/bfin/bfroms/bf54x_l1-0.2.h                     |    3 +-
 sim/bfin/bfroms/bf561-0.5.h                        |    3 +-
 sim/bfin/bfroms/bf59x-0.0.h                        |    3 +-
 sim/bfin/bfroms/bf59x_l1-0.1.h                     |    3 +-
 sim/bfin/configure                                 |    1 +
 sim/bfin/configure.ac                              |    1 +
 sim/bfin/dv-bfin_cec.c                             |   12 +-
 sim/bfin/dv-bfin_ctimer.c                          |    9 +-
 sim/bfin/dv-bfin_dma.c                             |    9 +-
 sim/bfin/dv-bfin_dmac.c                            |   75 +-
 sim/bfin/dv-bfin_ebiu_amc.c                        |   12 +-
 sim/bfin/dv-bfin_ebiu_ddrc.c                       |    6 +-
 sim/bfin/dv-bfin_ebiu_sdc.c                        |    6 +-
 sim/bfin/dv-bfin_emac.c                            |    9 +-
 sim/bfin/dv-bfin_eppi.c                            |    9 +-
 sim/bfin/dv-bfin_evt.c                             |    6 +-
 sim/bfin/dv-bfin_gpio.c                            |  287 ++++
 .../py-stopevent.h => sim/bfin/dv-bfin_gpio.h      |   28 +-
 sim/bfin/dv-bfin_gptimer.c                         |    9 +-
 sim/bfin/dv-bfin_jtag.c                            |    6 +-
 sim/bfin/dv-bfin_mmu.c                             |    6 +-
 sim/bfin/dv-bfin_nfc.c                             |    9 +-
 sim/bfin/dv-bfin_otp.c                             |    6 +-
 sim/bfin/dv-bfin_pll.c                             |    9 +-
 sim/bfin/dv-bfin_ppi.c                             |    9 +-
 sim/bfin/dv-bfin_rtc.c                             |    9 +-
 sim/bfin/dv-bfin_sic.c                             |   42 +-
 sim/bfin/dv-bfin_spi.c                             |    9 +-
 sim/bfin/dv-bfin_trace.c                           |    6 +-
 sim/bfin/dv-bfin_twi.c                             |    9 +-
 sim/bfin/dv-bfin_uart.c                            |    9 +-
 sim/bfin/dv-bfin_uart2.c                           |    9 +-
 sim/bfin/dv-bfin_wdog.c                            |    9 +-
 sim/bfin/dv-bfin_wp.c                              |    6 +-
 sim/bfin/dv-eth_phy.c                              |    6 +-
 sim/bfin/gui.c                                     |   18 +-
 sim/bfin/linux-fixed-code.h                        |    3 +-
 sim/bfin/linux-targ-map.h                          |   12 +-
 sim/bfin/machs.c                                   |  197 ++-
 sim/common/ChangeLog                               |   12 +
 sim/common/callback.c                              |   38 +-
 sim/common/cgen-engine.h                           |    4 +-
 sim/common/dv-core.c                               |    6 +-
 sim/common/dv-glue.c                               |   24 +-
 sim/common/dv-pal.c                                |   18 +-
 sim/common/hw-base.c                               |    8 +-
 sim/common/hw-device.c                             |    2 +-
 sim/common/hw-device.h                             |    2 +-
 sim/common/hw-handles.c                            |    6 +-
 sim/common/hw-instances.c                          |    2 +-
 sim/common/hw-ports.c                              |    2 +-
 sim/common/hw-ports.h                              |    6 +-
 sim/common/hw-properties.c                         |   60 +-
 sim/common/hw-tree.c                               |   98 +-
 sim/common/nrun.c                                  |   20 +-
 sim/common/run-sim.h                               |    2 +-
 sim/common/run.c                                   |    2 +-
 sim/common/sim-alu.h                               |   18 +-
 sim/common/sim-assert.h                            |    2 +-
 sim/common/sim-base.h                              |    2 +-
 sim/common/sim-basics.h                            |    2 +-
 sim/common/sim-config.c                            |   26 +-
 sim/common/sim-core.c                              |   18 +-
 sim/common/sim-core.h                              |    2 +-
 sim/common/sim-engine.h                            |    2 +-
 sim/common/sim-events.c                            |   34 +-
 sim/common/sim-events.h                            |    2 +-
 sim/common/sim-fpu.c                               |   58 +-
 sim/common/sim-hw.c                                |   12 +-
 sim/common/sim-inline.h                            |    6 +-
 sim/common/sim-load.c                              |    8 +-
 sim/common/sim-memopt.c                            |    8 +-
 sim/common/sim-n-core.h                            |    4 +-
 sim/common/sim-options.c                           |   10 +-
 sim/common/sim-profile.c                           |    8 +-
 sim/common/sim-signal.c                            |    2 +-
 sim/common/sim-trace.c                             |   26 +-
 sim/common/sim-trace.h                             |    6 +-
 sim/common/sim-utils.c                             |    6 +-
 sim/common/sim-watch.c                             |   16 +-
 sim/common/syscall.c                               |    2 +-
 205 files changed, 4652 insertions(+), 1558 deletions(-)
 copy gdb/{python/py-stopevent.h => testsuite/gdb.base/break-on-linker-gcd-function.cc} (50%)
 create mode 100644 gdb/testsuite/gdb.base/break-on-linker-gcd-function.exp
 copy gdb/{python/py-stopevent.h => testsuite/gdb.cp/cmpd-minsyms.cc} (51%)
 create mode 100644 gdb/testsuite/gdb.cp/cmpd-minsyms.exp
 create mode 100644 gdb/testsuite/gdb.cp/ovsrch.exp
 copy gdb/{python/py-stopevent.h => testsuite/gdb.cp/ovsrch.h} (51%)
 copy gdb/{python/py-stopevent.h => testsuite/gdb.cp/ovsrch1.cc} (51%)
 create mode 100644 gdb/testsuite/gdb.cp/ovsrch2.cc
 create mode 100644 gdb/testsuite/gdb.cp/ovsrch3.cc
 copy gdb/{python/py-stopevent.h => testsuite/gdb.cp/ovsrch4.cc} (51%)
 create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.S
 create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp
 create mode 100644 gdb/testsuite/gdb.python/py-objfile.c
 create mode 100644 gdb/testsuite/gdb.python/py-objfile.exp
 create mode 100644 sim/bfin/ChangeLog
 create mode 100644 sim/bfin/dv-bfin_gpio.c
 copy gdb/python/py-stopevent.h => sim/bfin/dv-bfin_gpio.h (51%)

First 500 lines of diff:
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 0bdc2ad..a1131c8 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,103 @@
 2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
 
+	* reloc.c (BFD_RELOC_ARM_IRELATIVE): New relocation.
+	* bfd-in2.h: Regenerate.
+	* elf32-arm.c (elf32_arm_howto_table_2): Rename existing definition
+	to elf32_arm_howto_table_3 and replace with a single R_ARM_IRELATIVE
+	entry.
+	(elf32_arm_howto_from_type): Update accordingly.
+	(elf32_arm_reloc_map): Map BFD_RELOC_ARM_IRELATIVE to R_ARM_IRELATIVE.
+	(elf32_arm_reloc_name_lookup): Handle elf32_arm_howto_table_3.
+	(arm_plt_info): New structure, split out from elf32_arm_link_hash_entry
+	with an extra noncall_refcount field.
+	(arm_local_iplt_info): New structure.
+	(elf_arm_obj_tdata): Add local_iplt.
+	(elf32_arm_local_iplt): New accessor macro.
+	(elf32_arm_link_hash_entry): Replace plt_thumb_refcount,
+	plt_maybe_thumb_refcount and plt_got_offset with an arm_plt_info.
+	Change tls_type to a bitfield and add is_iplt.
+	(elf32_arm_link_hash_newfunc): Update accordingly.
+	(elf32_arm_allocate_local_sym_info): New function.
+	(elf32_arm_create_local_iplt): Likewise.
+	(elf32_arm_get_plt_info): Likewise.
+	(elf32_arm_plt_needs_thumb_stub_p): Likewise.
+	(elf32_arm_get_local_dynreloc_list): Likewise.
+	(create_ifunc_sections): Likewise.
+	(elf32_arm_copy_indirect_symbol): Update after the changes to
+	elf32_arm_link_hash_entry.  Assert the is_iplt has not yet been set.
+	(arm_type_of_stub): Add an st_type argument.  Use elf32_arm_get_plt_info
+	to get PLT information.  Assert that all STT_GNU_IFUNC references
+	are turned into PLT references.
+	(arm_build_one_stub): Pass the symbol type to
+	elf32_arm_final_link_relocate.
+	(elf32_arm_size_stubs): Pass the symbol type to arm_type_of_stub.
+	(elf32_arm_allocate_irelocs): New function.
+	(elf32_arm_add_dynreloc): In static objects, use .rel.iplt for
+	all R_ARM_IRELATIVE.
+	(elf32_arm_allocate_plt_entry): New function.
+	(elf32_arm_populate_plt_entry): Likewise.
+	(elf32_arm_final_link_relocate): Add an st_type parameter.
+	Set srelgot to null for static objects.  Use separate variables
+	to record which st_value and st_type should be used when generating
+	a dynamic relocation.  Use elf32_arm_get_plt_info to find the
+	symbol's PLT information, setting has_iplt_entry, splt,
+	plt_offset and gotplt_offset accordingly.  Check whether
+	STT_GNU_IFUNC symbols should resolve to an .iplt entry, and change
+	the relocation target accordingly.  Broaden assert to include
+	.iplts.  Don't set sreloc for static relocations.  Assert that
+	we only generate dynamic R_ARM_RELATIVE relocations for R_ARM_ABS32
+	and R_ARM_ABS32_NOI.  Generate R_ARM_IRELATIVE relocations instead
+	of R_ARM_RELATIVE relocations if the target is an STT_GNU_IFUNC
+	symbol.  Pass the symbol type to arm_type_of_stub.  Conditionally
+	resolve GOT references to the .igot.plt entry.
+	(elf32_arm_relocate_section): Update the call to
+	elf32_arm_final_link_relocate.
+	(elf32_arm_gc_sweep_hook): Use elf32_arm_get_plt_info to get PLT
+	information.  Treat R_ARM_REL32 and R_ARM_REL32_NOI as call
+	relocations in shared libraries and relocatable executables.
+	Count non-call PLT references.  Use elf32_arm_get_local_dynreloc_list
+	to get the list of dynamic relocations for a local symbol.
+	(elf32_arm_check_relocs): Always create ifunc sections.  Set isym
+	at the same time as setting h.  Use elf32_arm_allocate_local_sym_info
+	to allocate local symbol information.  Treat R_ARM_REL32 and
+	R_ARM_REL32_NOI as call relocations in shared libraries and
+	relocatable executables.  Record PLT information for local
+	STT_GNU_IFUNC functions as well as global functions.   Count
+	non-call PLT references.  Use elf32_arm_get_local_dynreloc_list
+	to get the list of dynamic relocations for a local symbol.
+	(elf32_arm_adjust_dynamic_symbol): Handle STT_GNU_IFUNC symbols.
+	Don't remove STT_GNU_IFUNC PLTs unless all references have been
+	removed.  Update after the changes to elf32_arm_link_hash_entry.
+	(allocate_dynrelocs_for_symbol): Decide whether STT_GNU_IFUNC PLT
+	entries should live in .plt or .iplt.  Check whether the .igot.plt
+	and .got entries can be combined.  Use elf32_arm_allocate_plt_entry
+	to allocate .plt and .(i)got.plt entries.  Detect which .got
+	entries will need R_ARM_IRELATIVE relocations and use
+	elf32_arm_allocate_irelocs to allocate them.  Likewise other
+	non-.got dynamic relocations.
+	(elf32_arm_size_dynamic_sections): Allocate .iplt, .igot.plt
+	and dynamic relocations for local STT_GNU_IFUNC symbols.
+	Check whether the .igot.plt and .got entries can be combined.
+	Detect which .got entries will need R_ARM_IRELATIVE relocations
+	and use elf32_arm_allocate_irelocs to allocate them.  Use stashed
+	section pointers intead of strcmp checks.  Handle iplt and igotplt.
+	(elf32_arm_finish_dynamic_symbol): Use elf32_arm_populate_plt_entry
+	to fill in .plt, .got.plt and .rel(a).plt entries.  Point
+	STT_GNU_IFUNC symbols at an .iplt entry if non-call relocations
+	resolve to it.
+	(elf32_arm_output_plt_map_1): New function, split out from
+	elf32_arm_output_plt_map.  Handle .iplt entries.  Use
+	elf32_arm_plt_needs_thumb_stub_p.
+	(elf32_arm_output_plt_map): Call it.
+	(elf32_arm_output_arch_local_syms): Add mapping symbols for
+	local .iplt entries.
+	(elf32_arm_swap_symbol_in): Handle Thumb STT_GNU_IFUNC symbols.
+	(elf32_arm_swap_symbol_out): Likewise.
+	(elf32_arm_add_symbol_hook): New function.
+	(elf_backend_add_symbol_hook): Define for all targets.
+
+2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
+
 	* elf-bfd.h (elf_link_hash_entry): Add target_internal.
 	* elf.c (swap_out_syms): Set st_target_internal for each
 	Elf_Internal_Sym.
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 84fc75d..5f3a31f 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -3186,6 +3186,9 @@ pc-relative or some form of GOT-indirect relocation.  */
 /* Annotation of BX instructions.  */
   BFD_RELOC_ARM_V4BX,
 
+/* ARM support for STT_GNU_IFUNC.  */
+  BFD_RELOC_ARM_IRELATIVE,
+
 /* These relocs are only used within the ARM assembler.  They are not
 (at present) written to any object files.  */
   BFD_RELOC_ARM_IMMEDIATE,
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 9f2b696..6b69fd6 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -1651,6 +1651,7 @@ static reloc_howto_type elf32_arm_howto_table_1[] =
 	 0x00000fff,		/* dst_mask */
 	 FALSE),		/* pcrel_offset */
 
+  /* 112-127 private relocations.  */
   EMPTY_HOWTO (112),
   EMPTY_HOWTO (113),
   EMPTY_HOWTO (114),
@@ -1667,6 +1668,8 @@ static reloc_howto_type elf32_arm_howto_table_1[] =
   EMPTY_HOWTO (125),
   EMPTY_HOWTO (126),
   EMPTY_HOWTO (127),
+
+  /* R_ARM_ME_TOO, obsolete.  */
   EMPTY_HOWTO (128),
 
   HOWTO (R_ARM_THM_TLS_DESCSEQ,	/* type */
@@ -1684,13 +1687,26 @@ static reloc_howto_type elf32_arm_howto_table_1[] =
 	 FALSE),		/* pcrel_offset */
 };
 
-/* 112-127 private relocations
-   128 R_ARM_ME_TOO, obsolete
-   129-255 unallocated in AAELF.
-
-   249-255 extended, currently unused, relocations:  */
+/* 160 onwards: */
+static reloc_howto_type elf32_arm_howto_table_2[1] =
+{
+  HOWTO (R_ARM_IRELATIVE,	/* type */
+         0,                     /* rightshift */
+         2,                     /* size (0 = byte, 1 = short, 2 = long) */
+         32,                    /* bitsize */
+         FALSE,                 /* pc_relative */
+         0,                     /* bitpos */
+         complain_overflow_bitfield,/* complain_on_overflow */
+         bfd_elf_generic_reloc, /* special_function */
+         "R_ARM_IRELATIVE",	/* name */
+         TRUE,			/* partial_inplace */
+         0xffffffff,		/* src_mask */
+         0xffffffff,		/* dst_mask */
+         FALSE)			/* pcrel_offset */
+};
 
-static reloc_howto_type elf32_arm_howto_table_2[4] =
+/* 249-255 extended, currently unused, relocations:  */
+static reloc_howto_type elf32_arm_howto_table_3[4] =
 {
   HOWTO (R_ARM_RREL32,		/* type */
 	 0,			/* rightshift */
@@ -1755,9 +1771,12 @@ elf32_arm_howto_from_type (unsigned int r_type)
   if (r_type < ARRAY_SIZE (elf32_arm_howto_table_1))
     return &elf32_arm_howto_table_1[r_type];
 
+  if (r_type == R_ARM_IRELATIVE)
+    return &elf32_arm_howto_table_2[r_type - R_ARM_IRELATIVE];
+
   if (r_type >= R_ARM_RREL32
-      && r_type < R_ARM_RREL32 + ARRAY_SIZE (elf32_arm_howto_table_2))
-    return &elf32_arm_howto_table_2[r_type - R_ARM_RREL32];
+      && r_type < R_ARM_RREL32 + ARRAY_SIZE (elf32_arm_howto_table_3))
+    return &elf32_arm_howto_table_3[r_type - R_ARM_RREL32];
 
   return NULL;
 }
@@ -1827,6 +1846,7 @@ static const struct elf32_arm_reloc_map elf32_arm_reloc_map[] =
     {BFD_RELOC_ARM_TLS_TPOFF32,      R_ARM_TLS_TPOFF32},
     {BFD_RELOC_ARM_TLS_IE32,         R_ARM_TLS_IE32},
     {BFD_RELOC_ARM_TLS_LE32,         R_ARM_TLS_LE32},
+    {BFD_RELOC_ARM_IRELATIVE,        R_ARM_IRELATIVE},
     {BFD_RELOC_VTABLE_INHERIT,	     R_ARM_GNU_VTINHERIT},
     {BFD_RELOC_VTABLE_ENTRY,	     R_ARM_GNU_VTENTRY},
     {BFD_RELOC_ARM_MOVW,	     R_ARM_MOVW_ABS_NC},
@@ -1897,6 +1917,11 @@ elf32_arm_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
 	&& strcasecmp (elf32_arm_howto_table_2[i].name, r_name) == 0)
       return &elf32_arm_howto_table_2[i];
 
+  for (i = 0; i < ARRAY_SIZE (elf32_arm_howto_table_3); i++)
+    if (elf32_arm_howto_table_3[i].name != NULL
+	&& strcasecmp (elf32_arm_howto_table_3[i].name, r_name) == 0)
+      return &elf32_arm_howto_table_3[i];
+
   return NULL;
 }
 
@@ -2550,6 +2575,44 @@ struct a8_erratum_reloc {
 /* The size of the thread control block.  */
 #define TCB_SIZE	8
 
+/* ARM-specific information about a PLT entry, over and above the usual
+   gotplt_union.  */
+struct arm_plt_info {
+  /* We reference count Thumb references to a PLT entry separately,
+     so that we can emit the Thumb trampoline only if needed.  */
+  bfd_signed_vma thumb_refcount;
+
+  /* Some references from Thumb code may be eliminated by BL->BLX
+     conversion, so record them separately.  */
+  bfd_signed_vma maybe_thumb_refcount;
+
+  /* How many of the recorded PLT accesses were from non-call relocations.
+     This information is useful when deciding whether anything takes the
+     address of an STT_GNU_IFUNC PLT.  A value of 0 means that all
+     non-call references to the function should resolve directly to the
+     real runtime target.  */
+  unsigned int noncall_refcount;
+
+  /* Since PLT entries have variable size if the Thumb prologue is
+     used, we need to record the index into .got.plt instead of
+     recomputing it from the PLT offset.  */
+  bfd_signed_vma got_offset;
+};
+
+/* Information about an .iplt entry for a local STT_GNU_IFUNC symbol.  */
+struct arm_local_iplt_info {
+  /* The information that is usually found in the generic ELF part of
+     the hash table entry.  */
+  union gotplt_union root;
+
+  /* The information that is usually found in the ARM-specific part of
+     the hash table entry.  */
+  struct arm_plt_info arm;
+
+  /* A list of all potential dynamic relocations against this symbol.  */
+  struct elf_dyn_relocs *dyn_relocs;
+};
+
 struct elf_arm_obj_tdata
 {
   struct elf_obj_tdata root;
@@ -2560,6 +2623,9 @@ struct elf_arm_obj_tdata
   /* GOTPLT entries for TLS descriptors.  */
   bfd_vma *local_tlsdesc_gotent;
 
+  /* Information for local symbols that need entries in .iplt.  */
+  struct arm_local_iplt_info **local_iplt;
+
   /* Zero to warn when linking objects with incompatible enum sizes.  */
   int no_enum_size_warning;
 
@@ -2576,6 +2642,9 @@ struct elf_arm_obj_tdata
 #define elf32_arm_local_tlsdesc_gotent(bfd) \
   (elf_arm_tdata (bfd)->local_tlsdesc_gotent)
 
+#define elf32_arm_local_iplt(bfd) \
+  (elf_arm_tdata (bfd)->local_iplt)
+
 #define is_arm_elf(bfd) \
   (bfd_get_flavour (bfd) == bfd_target_elf_flavour \
    && elf_tdata (bfd) != NULL \
@@ -2598,18 +2667,8 @@ struct elf32_arm_link_hash_entry
     /* Track dynamic relocs copied for this symbol.  */
     struct elf_dyn_relocs *dyn_relocs;
 
-    /* We reference count Thumb references to a PLT entry separately,
-       so that we can emit the Thumb trampoline only if needed.  */
-    bfd_signed_vma plt_thumb_refcount;
-
-    /* Some references from Thumb code may be eliminated by BL->BLX
-       conversion, so record them separately.  */
-    bfd_signed_vma plt_maybe_thumb_refcount;
-
-    /* Since PLT entries have variable size if the Thumb prologue is
-       used, we need to record the index into .got.plt instead of
-       recomputing it from the PLT offset.  */
-    bfd_signed_vma plt_got_offset;
+    /* ARM-specific PLT information.  */
+    struct arm_plt_info plt;
 
 #define GOT_UNKNOWN	0
 #define GOT_NORMAL	1
@@ -2617,7 +2676,12 @@ struct elf32_arm_link_hash_entry
 #define GOT_TLS_IE	4
 #define GOT_TLS_GDESC	8
 #define GOT_TLS_GD_ANY_P(type)	((type & GOT_TLS_GD) || (type & GOT_TLS_GDESC))
-    unsigned char tls_type;
+    unsigned int tls_type : 8;
+
+    /* True if the symbol's PLT entry is in .iplt rather than .plt.  */
+    unsigned int is_iplt : 1;
+
+    unsigned int unused : 23;
 
     /* Offset of the GOTPLT entry reserved for the TLS descriptor,
        starting at the end of the jump table.  */
@@ -2833,9 +2897,11 @@ elf32_arm_link_hash_newfunc (struct bfd_hash_entry * entry,
       ret->dyn_relocs = NULL;
       ret->tls_type = GOT_UNKNOWN;
       ret->tlsdesc_got = (bfd_vma) -1;
-      ret->plt_thumb_refcount = 0;
-      ret->plt_maybe_thumb_refcount = 0;
-      ret->plt_got_offset = -1;
+      ret->plt.thumb_refcount = 0;
+      ret->plt.maybe_thumb_refcount = 0;
+      ret->plt.noncall_refcount = 0;
+      ret->plt.got_offset = -1;
+      ret->is_iplt = FALSE;
       ret->export_glue = NULL;
 
       ret->stub_cache = NULL;
@@ -2844,6 +2910,142 @@ elf32_arm_link_hash_newfunc (struct bfd_hash_entry * entry,
   return (struct bfd_hash_entry *) ret;
 }
 
+/* Ensure that we have allocated bookkeeping structures for ABFD's local
+   symbols.  */
+
+static bfd_boolean
+elf32_arm_allocate_local_sym_info (bfd *abfd)
+{
+  if (elf_local_got_refcounts (abfd) == NULL)
+    {
+      bfd_size_type num_syms;
+      bfd_size_type size;
+      char *data;
+
+      num_syms = elf_tdata (abfd)->symtab_hdr.sh_info;
+      size = num_syms * (sizeof (bfd_signed_vma)
+			 + sizeof (struct arm_local_iplt_info *)
+			 + sizeof (bfd_vma)
+			 + sizeof (char));
+      data = bfd_zalloc (abfd, size);
+      if (data == NULL)
+	return FALSE;
+
+      elf_local_got_refcounts (abfd) = (bfd_signed_vma *) data;
+      data += num_syms * sizeof (bfd_signed_vma);
+
+      elf32_arm_local_iplt (abfd) = (struct arm_local_iplt_info **) data;
+      data += num_syms * sizeof (struct arm_local_iplt_info *);
+
+      elf32_arm_local_tlsdesc_gotent (abfd) = (bfd_vma *) data;
+      data += num_syms * sizeof (bfd_vma);
+
+      elf32_arm_local_got_tls_type (abfd) = data;
+    }
+  return TRUE;
+}
+
+/* Return the .iplt information for local symbol R_SYMNDX, which belongs
+   to input bfd ABFD.  Create the information if it doesn't already exist.
+   Return null if an allocation fails.  */
+
+static struct arm_local_iplt_info *
+elf32_arm_create_local_iplt (bfd *abfd, unsigned long r_symndx)
+{
+  struct arm_local_iplt_info **ptr;
+
+  if (!elf32_arm_allocate_local_sym_info (abfd))
+    return NULL;
+
+  BFD_ASSERT (r_symndx < elf_tdata (abfd)->symtab_hdr.sh_info);
+  ptr = &elf32_arm_local_iplt (abfd)[r_symndx];
+  if (*ptr == NULL)
+    *ptr = bfd_zalloc (abfd, sizeof (**ptr));
+  return *ptr;
+}
+
+/* Try to obtain PLT information for the symbol with index R_SYMNDX
+   in ABFD's symbol table.  If the symbol is global, H points to its
+   hash table entry, otherwise H is null.
+
+   Return true if the symbol does have PLT information.  When returning
+   true, point *ROOT_PLT at the target-independent reference count/offset
+   union and *ARM_PLT at the ARM-specific information.  */
+
+static bfd_boolean
+elf32_arm_get_plt_info (bfd *abfd, struct elf32_arm_link_hash_entry *h,
+			unsigned long r_symndx, union gotplt_union **root_plt,
+			struct arm_plt_info **arm_plt)
+{
+  struct arm_local_iplt_info *local_iplt;
+
+  if (h != NULL)
+    {
+      *root_plt = &h->root.plt;
+      *arm_plt = &h->plt;
+      return TRUE;
+    }
+
+  if (elf32_arm_local_iplt (abfd) == NULL)
+    return FALSE;
+
+  local_iplt = elf32_arm_local_iplt (abfd)[r_symndx];
+  if (local_iplt == NULL)
+    return FALSE;
+
+  *root_plt = &local_iplt->root;
+  *arm_plt = &local_iplt->arm;
+  return TRUE;
+}
+
+/* Return true if the PLT described by ARM_PLT requires a Thumb stub
+   before it.  */
+
+static bfd_boolean
+elf32_arm_plt_needs_thumb_stub_p (struct bfd_link_info *info,
+				  struct arm_plt_info *arm_plt)
+{
+  struct elf32_arm_link_hash_table *htab;
+
+  htab = elf32_arm_hash_table (info);
+  return (arm_plt->thumb_refcount != 0
+	  || (!htab->use_blx && arm_plt->maybe_thumb_refcount != 0));
+}
+
+/* Return a pointer to the head of the dynamic reloc list that should
+   be used for local symbol ISYM, which is symbol number R_SYMNDX in
+   ABFD's symbol table.  Return null if an error occurs.  */
+
+static struct elf_dyn_relocs **
+elf32_arm_get_local_dynreloc_list (bfd *abfd, unsigned long r_symndx,
+				   Elf_Internal_Sym *isym)
+{
+  if (ELF32_ST_TYPE (isym->st_info) == STT_GNU_IFUNC)
+    {
+      struct arm_local_iplt_info *local_iplt;
+
+      local_iplt = elf32_arm_create_local_iplt (abfd, r_symndx);
+      if (local_iplt == NULL)
+	return NULL;
+      return &local_iplt->dyn_relocs;
+    }
+  else
+    {
+      /* Track dynamic relocs needed for local syms too.
+	 We really need local syms available to do this
+	 easily.  Oh well.  */
+      asection *s;
+      void *vpp;
+
+      s = bfd_section_from_elf_index (abfd, isym->st_shndx);
+      if (s == NULL)
+	abort ();
+
+      vpp = &elf_section_data (s)->local_dynrel;
+      return (struct elf_dyn_relocs **) vpp;
+    }
+}
+
 /* Initialize an entry in the stub hash table.  */
 
 static struct bfd_hash_entry *
@@ -2909,6 +3111,53 @@ create_got_section (bfd *dynobj, struct bfd_link_info *info)
   return TRUE;
 }
 
+/* Create the .iplt, .rel(a).iplt and .igot.plt sections.  */
+
+static bfd_boolean
+create_ifunc_sections (struct bfd_link_info *info)
+{
+  struct elf32_arm_link_hash_table *htab;
+  const struct elf_backend_data *bed;
+  bfd *dynobj;
+  asection *s;
+  flagword flags;
+  
+  htab = elf32_arm_hash_table (info);
+  dynobj = htab->root.dynobj;
+  bed = get_elf_backend_data (dynobj);
+  flags = bed->dynamic_sec_flags;
+
+  if (htab->root.iplt == NULL)
+    {
+      s = bfd_make_section_with_flags (dynobj, ".iplt",
+				       flags | SEC_READONLY | SEC_CODE);
+      if (s == NULL
+	  || !bfd_set_section_alignment (abfd, s, bed->plt_alignment))
+	return FALSE;
+      htab->root.iplt = s;
+    }
+
+  if (htab->root.irelplt == NULL)


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-03-18 15:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-18 15:37 [SCM] archer-muller-windows-multi: * Remove space before #endif muller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).