adding objects to bones`

I was woundering how you go about adding objects to bones, like if you were to make a mech rig. I can’t figure it out, I know how to attach a mesh to an armature but don’t know how to attach a object to just a bone so that it stays with that bone

short awnser is to use weight painting on your mesh with the certain bone selected that probably wont help much so read this:
http://wiki.blender.org/index.php/BSoD/Introduction_to_Character_Animation/Upper_body_weight_painting

No, weight painting has nothing to do with parenting an object/mesh to an armature bone …

To do that simply Ctrl-Tab into Pose Mode with the armature selected then select the object/mesh you want to parent to a bone then shift-select the bone you want to be the parent and Ctrl-P -> “MakeParent to” -> Bone .