Oakland sent right-handers Abdiel Mendoza and Teodoro Ortega to Texas in the trade.
Gearrin, 32, is 2-1 with a save and a 3.51 ERA in 56 appearances for the San Francisco Giants and Rangers this season. He has a 3.48 ERA in 264 career appearances.
Mendoza, 19, is 2-3 with a 3.32 ERA in 13 appearances (10 starts) for Class A Vermont this season. Ortega, 18, was 3-1 with a 2.11 ERA in 14 appearances (six starts) for the A’s in the Dominican Summer League.