diff options
| author | Rod Evans <Rod.Evans@Sun.COM> | 2010-05-26 10:36:21 -0700 |
|---|---|---|
| committer | Rod Evans <Rod.Evans@Sun.COM> | 2010-05-26 10:36:21 -0700 |
| commit | 02938ba214e4690cccd8cbd233d1242246ef6ff1 (patch) | |
| tree | fc04855e7dda45ec3d18970b303eecf7cfe3cf3d /usr/src/cmd/sgs/liblddbg | |
| parent | 214c21966e601d9d9946efda70b0d87b019d10dc (diff) | |
| download | illumos-joyent-02938ba214e4690cccd8cbd233d1242246ef6ff1.tar.gz | |
6949596 wrong section alignment generated in joint compilation with shared library
Diffstat (limited to 'usr/src/cmd/sgs/liblddbg')
| -rw-r--r-- | usr/src/cmd/sgs/liblddbg/common/liblddbg.msg | 4 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/liblddbg/common/llib-llddbg | 4 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/liblddbg/common/mapfile-vers | 6 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/liblddbg/common/syms.c | 18 |
4 files changed, 23 insertions, 9 deletions
diff --git a/usr/src/cmd/sgs/liblddbg/common/liblddbg.msg b/usr/src/cmd/sgs/liblddbg/common/liblddbg.msg index b4222142e0..d24d241be1 100644 --- a/usr/src/cmd/sgs/liblddbg/common/liblddbg.msg +++ b/usr/src/cmd/sgs/liblddbg/common/liblddbg.msg @@ -975,6 +975,8 @@ (-z symbolcap)" @ MSG_SYM_CAP_LOCAL "symbol[%d]=%s creating local capability \ (-z symbolcap)" +@ MSG_SYM_COPY_DST "symbol=%s; copy destination: alignment: 0x%x" +@ MSG_SYM_COPY_REF "symbol=%s; copy reference" @ MSG_SYM_AOUT "symbol=%s; (original AOUT name)" @ MSG_SYM_LOOKUP "symbol=%s; lookup in file=%s [ %s ]" @@ -1592,7 +1594,7 @@ @ MSG_SYM_GLOBAL "global" @ MSG_SYM_LOCAL "local" -@ MSG_SYM_COPY "copy rel" +@ MSG_SYM_COPY "copy" @ MSG_DLSYM_NEXT "[ RTLD_NEXT ]" @ MSG_DLSYM_DEFAULT "[ RTLD_DEFAULT ]" diff --git a/usr/src/cmd/sgs/liblddbg/common/llib-llddbg b/usr/src/cmd/sgs/liblddbg/common/llib-llddbg index d642fbc66a..9c090f2571 100644 --- a/usr/src/cmd/sgs/liblddbg/common/llib-llddbg +++ b/usr/src/cmd/sgs/liblddbg/common/llib-llddbg @@ -419,6 +419,8 @@ void Dbg64_syms_cap_lookup(Rt_map *, uint_t, const char *, uint_t, Half, Syscapset *); void Dbg32_syms_cap_title(Ofl_desc *); void Dbg64_syms_cap_title(Ofl_desc *); +void Dbg32_syms_copy_reloc(Ofl_desc *, Sym_desc *, Word); +void Dbg64_syms_copy_reloc(Ofl_desc *, Sym_desc *, Word); void Dbg32_syms_created(Lm_list *, const char *); void Dbg64_syms_created(Lm_list *, const char *); void Dbg32_syms_discarded(Lm_list *, Sym_desc *); @@ -444,8 +446,6 @@ void Dbg32_syms_process(Lm_list *, Ifl_desc *); void Dbg64_syms_process(Lm_list *, Ifl_desc *); void Dbg32_syms_reduce(Ofl_desc *, int, Sym_desc *, int, const char *); void Dbg64_syms_reduce(Ofl_desc *, int, Sym_desc *, int, const char *); -void Dbg32_syms_reloc(Ofl_desc *, Sym_desc *); -void Dbg64_syms_reloc(Ofl_desc *, Sym_desc *); void Dbg32_syms_resolved(Ofl_desc *, Sym_desc *); void Dbg64_syms_resolved(Ofl_desc *, Sym_desc *); void Dbg32_syms_resolving(Ofl_desc *, Elf32_Word, const char *, int, int, diff --git a/usr/src/cmd/sgs/liblddbg/common/mapfile-vers b/usr/src/cmd/sgs/liblddbg/common/mapfile-vers index 5adf699ee4..ad9fa30e92 100644 --- a/usr/src/cmd/sgs/liblddbg/common/mapfile-vers +++ b/usr/src/cmd/sgs/liblddbg/common/mapfile-vers @@ -40,7 +40,7 @@ # MAPFILE HEADER END # -SUNWprivate_4.79 { +SUNWprivate_4.80 { global: dbg_desc = NODIRECT; # interposed - ld.so.1(1) dbg_print = NODIRECT; # interposed - ld(1) and ld.so.1(1) @@ -398,6 +398,8 @@ SUNWprivate_4.79 { Dbg64_syms_cap_lookup; Dbg32_syms_cap_title; Dbg64_syms_cap_title; + Dbg32_syms_copy_reloc; + Dbg64_syms_copy_reloc; Dbg32_syms_created; Dbg64_syms_created; Dbg32_syms_discarded; @@ -429,8 +431,6 @@ SUNWprivate_4.79 { Dbg64_syms_process; Dbg32_syms_reduce; Dbg64_syms_reduce; - Dbg32_syms_reloc; - Dbg64_syms_reloc; Dbg32_syms_resolved; Dbg64_syms_resolved; Dbg32_syms_resolving; diff --git a/usr/src/cmd/sgs/liblddbg/common/syms.c b/usr/src/cmd/sgs/liblddbg/common/syms.c index 3fffd6eb7b..3083eec1fa 100644 --- a/usr/src/cmd/sgs/liblddbg/common/syms.c +++ b/usr/src/cmd/sgs/liblddbg/common/syms.c @@ -481,7 +481,7 @@ Dbg_syms_resolved(Ofl_desc *ofl, Sym_desc *sdp) } void -Dbg_syms_reloc(Ofl_desc *ofl, Sym_desc *sdp) +Dbg_syms_copy_reloc(Ofl_desc *ofl, Sym_desc *sdp, Word align) { static Boolean symbol_title = TRUE; Conv_inv_buf_t inv_buf; @@ -496,8 +496,20 @@ Dbg_syms_reloc(Ofl_desc *ofl, Sym_desc *sdp) symbol_title = FALSE; } - dbg_print(lml, MSG_INTL(MSG_SYM_UPDATE), - Dbg_demangle_name(sdp->sd_name)); + + /* + * Copy relocation symbols come in pairs, the original reference + * (within a dependency), and the new destination (within the .bss of + * the executable). The latter is accompanied with a computed + * alignment. + */ + if (align) { + dbg_print(lml, MSG_INTL(MSG_SYM_COPY_DST), + Dbg_demangle_name(sdp->sd_name), EC_WORD(align)); + } else { + dbg_print(lml, MSG_INTL(MSG_SYM_COPY_REF), + Dbg_demangle_name(sdp->sd_name)); + } if (DBG_NOTDETAIL()) return; |
