Using the theory of (phi, Gamma)-modules we generalize Greenberg's construction of the L-invariant to p-adic representations which are semistable at p. This allows us to formulate a quite general conjecture about the behavior of p-adic L-functions at trivial zeros.