summaryrefslogtreecommitdiff
path: root/ldso/ldso/arc/dl-startup.h
AgeCommit message (Collapse)Author
2017-01-15ARC: ldso: don't use _DYNAMIC@gotpc construct #2Vineet Gupta
This removes _DYNAMIC@gotpc from elf_machine_load_address() This is a seperate commit to callout the fact that old code was actually broken but was NOT caught since it never gets called (and will never be) since ld.so only calls it if kernel doesn't pass AT_BASE auxvt, which is not true for Linux. if (!auxvt[AT_BASE].a_un.a_val) auxvt[AT_BASE].a_un.a_val = elf_machine_load_address(); So while the intent was to remove _DYNAMIC@gotpc construct, we need to come up with something which works. The build time address computation of .dynamic which works well is: - "ld %1, [pcl, _DYNAMIC@gotpc] \n" + "ld %1, [pcl, _GLOBAL_OFFSET_TABLE_@pcl] \n" However the runtime address of .dynamic can only be generated with "add %0, pcl, _DYNAMIC@pcl \n" which unfortunately is what is currently broken as it is converted to i_GLOBAL_OFFSET_TABLE_t and thus refers to runtime address of .got and not .dyanmic Thus we resort to using an arbit symbol _dl_start at the expense of an extra GOT entry and a bogus R_ARC_NONE relo in ldso itself which now needs to be ignored. Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2016-07-31ARC: Update relocation syntax for old-thread model codeAndrew Burgess
This commit reverses a change introduced in commit 20554a78a9bba that split some of the ARC code into two based on whether uClibc was configured with native threads or not. The native thread code was updated to use the relocation syntax of modern binutils, while the non-native code path used a syntax only accepted in older versions of binutils. The problem with this is that the choice of old binutils or not is orthogonal to the choice of native threads or not, and so, inevitably a user with a recent version of binutils can make the choice to configure uClibc with non-native thread support, and run into code that will not assemble. The solution is either to abandon support for the old tools completely, or to add a new compile time flag for ARC that is set when the version of binutils being used is old; this new flag would allow the old relocation structure to be selected. In this commit I have simply dropped support for older versions of the tools.
2016-07-31ARC: Support R_ARC_JMP_SLOT relocations during bootstrapAndrew Burgess
This commit adds support for R_ARC_JMP_SLOT relocations during the bootstrap phase of the dynamic linker. These relocations will be generated if uClibc-ng is configured with 'DODEBUG=y'.
2015-02-16ARC: Conditionalise certain relocations as provided by TLS tools onlyVineet Gupta
uClibc mainline supports NPTL which in turns depends on TLS support in the tools (gcc/binutils), which is yet to be merged in dev branches. However there is some non NPTL code in uClibc, added as part of NPTL effort, which relies on certain relocations only provided by NPTL binutils. As a result building the current upstream even for LT.old breaks. So conditionalize that code on tools, bu tin lack of specific versions, we use NPTL enabling as a sign the tools are equipped to handle those relos. Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2014-08-18ARC: ldso: Use @pcl syntax.Joern Rennecke
Signed-off-by: Joern Rennecke <joern.rennecke@embecosm.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-12-20ldso: ARC whitespace tweaksVineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-12-20ldso: Add ARC supportVineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>