I use both footnotes and endnotes with package endnotes (also with footnotes in the endnotes). I would like at the end of an endnote to add a link back to the link location wherever it was opened (there may be multiple references to an endnote in addition to where it is defined, also in other endnotes).
\documentclass{article}
\usepackage[usenames]{color}
\usepackage{hyperref}
\hypersetup{
colorlinks=true, %RR colors links instead of ugly boxes
linkcolor=red
}
%% \ref replacement to color the term also eg \rrref{figure}{fig:blabla}
\def\rrref#1#2{\hyperref[#2]{#1,}\ref{#2}}
%% multi-par endnote with label: #1=topicname #2=reflabel #3=notetext
\usepackage{endnotes}
%RR normal number https://tex.stackexchange.com/questions/202542/ = egreg
\renewcommand\enoteformat{%
\makebox[0pt][r]{\theenmark. \rule{0pt}{\dimexpr\ht\strutbox+\baselineskip}}}
\usepackage{mfirstuc}
\long\def\rrendnote#1#2#3{%
\phantomsection\label{#2main}% %RR up front to jump back to start
\stepcounter{endnote}%
\hyperref[#2]{[{\color{red}{\bf {\em \theendnote\ #1/}}}]}%
{\endnotetext{\phantomsection\label{#2}% %RR StExch trick to jump correctly
\parindent=3ex
{\bf {\em \nopagebreak\xmakefirstuc{#1}/}}\[0.5ex]% %RR first upper case
{~,#3}% %RR note body
~~\hyperref[#2main]{[{\em Main call/}]}%
}}}
%RR fatter footnote numbers https://tex.stackexchange.com/questions/68580/
\makeatletter
\renewcommand{@makefnmark}{\hbox{\textsuperscript{\bf\scriptsize{@thefnmark}}}}
\makeatother
%RR clicking footnotenumber jumps back to text location (not for endnotes)
\usepackage{footnotebackref}
\begin{document}
\parindent=0ex
\parskip=3ex %% to make jump-to location clear
Bla bla bla \rrendnote{first endnote}{note:1}{%
This is the first endnote.}.
Bla bla bla \rrendnote{second endnote}{note:2}{%
This is the second endnote. In here I
refer to the first: see \rrref{endnote}{note:1}.
Now in endnote 1 I would like to add a clicker [Back] at the
end that jumps back to its link here, before the [Main call]
clicker that jumps back to the call in the main text.
There may be more such links to an endnote.}.
Bla bla bla.
%% endnotes
\begingroup
\def\enotesize{\normalsize} %RR normal readability
\newpage
\renewcommand{\enoteheading}{} %RR get rid of default Notes
\section{Notes}
\mbox{}\vspace*{-3ex} %RR fix white space, no idea why
~~\theendnotes %RR ~~ fix the first, no idea why
\endgroup
\end{document}

