summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr/src/cmd/sgs/libld/common/machrel.amd.c9
-rw-r--r--usr/src/cmd/sgs/libld/common/machrel.sparc.c9
-rw-r--r--usr/src/cmd/sgs/packages/common/SUNWonld-README1
3 files changed, 11 insertions, 8 deletions
diff --git a/usr/src/cmd/sgs/libld/common/machrel.amd.c b/usr/src/cmd/sgs/libld/common/machrel.amd.c
index 3bceeea7ef..151c29f9d3 100644
--- a/usr/src/cmd/sgs/libld/common/machrel.amd.c
+++ b/usr/src/cmd/sgs/libld/common/machrel.amd.c
@@ -624,7 +624,6 @@ ld_do_activerelocs(Ofl_desc *ofl)
Xword refaddr;
int moved = 0;
Gotref gref;
- Sxword raddend = arsp->rel_raddend;
/*
* If the section this relocation is against has been
@@ -694,7 +693,8 @@ ld_do_activerelocs(Ofl_desc *ofl)
*/
if ((sdp->sd_isc->is_flags & FLG_IS_RELUPD) &&
/* LINTED */
- (sym = ld_am_I_partial(arsp, raddend))) {
+ (sym = ld_am_I_partial(arsp,
+ arsp->rel_raddend))) {
/*
* The symbol was moved, so adjust
* the value relative to the new
@@ -715,7 +715,8 @@ ld_do_activerelocs(Ofl_desc *ofl)
* displacement within the range of
* the symbol.
*/
- raddend -= sym->sd_osym->st_value;
+ arsp->rel_raddend -=
+ sym->sd_osym->st_value;
} else {
value = _elf_getxoff(
sdp->sd_isc->is_indata);
@@ -776,7 +777,7 @@ ld_do_activerelocs(Ofl_desc *ofl)
* being referenced (ie: that -4 thing).
*/
if ((arsp->rel_flags & FLG_REL_GOT) == 0)
- value += raddend;
+ value += arsp->rel_raddend;
/*
* Determine whether the value needs further adjustment.
diff --git a/usr/src/cmd/sgs/libld/common/machrel.sparc.c b/usr/src/cmd/sgs/libld/common/machrel.sparc.c
index c01e5a7027..0d2774af8d 100644
--- a/usr/src/cmd/sgs/libld/common/machrel.sparc.c
+++ b/usr/src/cmd/sgs/libld/common/machrel.sparc.c
@@ -1018,7 +1018,6 @@ ld_do_activerelocs(Ofl_desc *ofl)
Sym_desc *sdp;
const char *ifl_name;
Xword refaddr;
- Sxword raddend = arsp->rel_raddend;
/*
* If the section this relocation is against has been
@@ -1082,7 +1081,8 @@ ld_do_activerelocs(Ofl_desc *ofl)
* is based off of that sections position.
*/
if ((sdp->sd_isc->is_flags & FLG_IS_RELUPD) &&
- (sym = ld_am_I_partial(arsp, raddend))) {
+ (sym = ld_am_I_partial(arsp,
+ arsp->rel_raddend))) {
/*
* The symbol was moved, so adjust
* the value relative to the new
@@ -1107,7 +1107,8 @@ ld_do_activerelocs(Ofl_desc *ofl)
* displacement within the range of
* the symbol.
*/
- raddend -= sym->sd_osym->st_value;
+ arsp->rel_raddend -=
+ sym->sd_osym->st_value;
} else {
value = _elf_getxoff(
sdp->sd_isc->is_indata);
@@ -1162,7 +1163,7 @@ ld_do_activerelocs(Ofl_desc *ofl)
* Add relocations addend to value. Add extra
* relocation addend if needed.
*/
- value += raddend;
+ value += arsp->rel_raddend;
if (IS_EXTOFFSET(arsp->rel_rtype))
value += arsp->rel_typedata;
diff --git a/usr/src/cmd/sgs/packages/common/SUNWonld-README b/usr/src/cmd/sgs/packages/common/SUNWonld-README
index 9c40c4a952..be0e9074a7 100644
--- a/usr/src/cmd/sgs/packages/common/SUNWonld-README
+++ b/usr/src/cmd/sgs/packages/common/SUNWonld-README
@@ -1418,3 +1418,4 @@ Bugid Risk Synopsis
6786744 32-bit dbx failed with unknown rtld_db.so error on snv_104
6789925 64-bit applications with SF1_SUNW_ADDR32 require non-default starting
address
+6792906 ld -z nopartial fix breaks TLS