On Thu, Aug 24, 2017 at 09:00:45AM -0600, Jason Gunthorpe wrote: > On Thu, Aug 24, 2017 at 08:27:16AM +0300, Leon Romanovsky wrote: > > > It is not complete output as I would expect to see. It doesn't have > > mlx5dv_init_obj (without explicit @MLX5_1.2). There is a need to declare default > > function name for the static linking has no knowledge of versions. > > symver support and static linking in verbs has never worked properly, > we need to do more work overall to fix that.. Fix yes, but push something that works to be broken is a different story. > > Some common macros a bit of use of .alias will do the job, but nobody > has cared enough about static linking to do it. We shouldn't worry > about that now... Maybe it is true for libibverbs, but it is not for libmlx4/5 which can be statically linked. > > > The simplest approach which is used in whole rdma-core is just retain > > the original function name and the patch below on top of your patch > > achieves it. > > Well, if this is the result you got: > > > 99: 000000000000dab0 55 FUNC GLOBAL DEFAULT 13 mlx5dv_init_obj@MLX5_1.0 > > 165: 000000000000dab0 55 FUNC LOCAL DEFAULT 13 __mlx5dv_init_obj_1_0 > > 194: 000000000000d8f0 443 FUNC LOCAL DEFAULT 13 mlx5dv_init_obj > > 268: 000000000000dab0 55 FUNC GLOBAL DEFAULT 13 mlx5dv_init_obj@MLX5_1.0 > > Then changing the name totally broke the dynamic symbols. Yes, I see, mlx5dv_init_obj should be GLOBAL. > > Which is what I remember when I last tried to work on this (to avoid > having to specify a prototype for the __). > > I concluded the linkers broke if there was a symbol in the link with > the same name as the versioned symbol when using _symver. > > Jason > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html
Attachment:
signature.asc
Description: PGP signature