  Let $A$ be an abelian variety over the function field of a smooth projective
curve $C$ over an algebraically closed field $k$. We compute the $l$-adic
cohomology groups of $C$ with coefficients in the locally constant sheaf
associated to $H^1(\bar A,\mathbf{Q}_l)$ in terms of arithmetico-geometric
invariants of $A$. We apply this, when $k$ is the algebraic closure of a finite
field, to a motivic computation of the $L$-function of $A$.
