For example, there is a symbol named country, I can get its information (type, address, and length) by nm -D -S
$ nm -D libs_ma.so -S
w _ITM_deregisterTMCloneTable
w _ITM_registerTMCloneTable
w __cxa_finalize
w __gmon_start__
0000000000004028 0000000000000008 D country
But how can I dump the address (4028) with length (8) by some Linux command (just like dlsym() and printf() worked in c program)?
Your best bet is probably to use a debugger, such as radare2 or GDB.
This question shows how to do that in radare2.
Here is how you could do this using GDB:
It is also rather easy to write a program in a language of your choice to do this. Your program would have to:
LOADsegments until it finds one with.p_vaddr <= $address < .p_vaddr + .p_memszmmaporreadthat segment, seek to$address - .p_vaddroffset, and dump$lengthbytes from there.