Abstract. It is known that the 3-manifold SL(2, Z)\ SL(2, R) is diffeomorphic to the complement of the trefoil knot in S 3 . E. Ghys showed that the linking number of this trefoil knot with a modular knot is given by the Rademacher symbol, which is a homogenization of the classical Dedekind symbol. The Dedekind symbol arose historically in the transformation formula of the logarithm of Dedekind's eta function under SL(2, Z). In this paper we give a generalization of the Dedekind symbol associated to a fixed modular knot. This symbol also arises in the transformation formula of a certain modular function. It can be computed in terms of a special value of a certain Dirichlet series and satisfies a reciprocity law. The homogenization of this symbol, which generalizes the Rademacher symbol, gives the linking number between two distinct symmetric links formed from modular knots.