Let $X$ be an irreducible, reduced, projective curve over an algebraically closed field, with at worst nodes as singularities. Let $\mathcal{F}$ be a trivial vector bundle on $X$ of rank $r$. Consider a short exact sequence of the form $$0 \to \mathcal{F}' \to \mathcal{F} \to \mathcal{F}'' \to 0,$$ where $\mathcal{F}'$ and $\mathcal{F}''$ are coherent, torsion-free sheaves. What is the formula for $\chi(\mathcal{H}om(\mathcal{F}',\mathcal{F}''))$? Is there any reference for this?
I know the answer to the question in the case $X$ is smooth.