Let $k$ be an infinite non-algebraically closed field, $X$ a smooth projective curve on $k$ and $E$ a locally-free sheaf on $X$ of rank at least $2$. Denote by $\bar{k}$ the algebraic closure of $k$, $X_{\bar{k}}$ the base-change of $X$ to $\bar{k}$ and $E_{\bar{k}}$ the pull-back of $E$ to $X_{\bar{k}}$.
Is the Riemann-Roch formula for $E$ the same as for $E_{\bar{k}}$? In particular, if $E_{\bar{k}}$ has a non-trivial global section then does it necessarily imply that $E$ too has a non-trivial global section defined over $k$?